Skip to content

Commit

Permalink
テーマ周りを調整
Browse files Browse the repository at this point in the history
  • Loading branch information
tasuren committed Jan 12, 2025
1 parent 2c1c15e commit db9da07
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/Paper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ function Paper() {
"p-2",
"outline",
"outline-1",
"focus:outline-black",
"dark:focus:outline-white",
"min-h-40",
"my-2",
"mx-3",
Expand Down
3 changes: 3 additions & 0 deletions src/lib/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,7 @@ export function applyThemeToDOM(theme: Theme) {

// カラースキーマを変更
document.documentElement.style.colorScheme = absTheme;

// Tailwind CSSのためのテーマ情報を設定
document.documentElement.setAttribute("data-theme", absTheme);
}
1 change: 1 addition & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** @type {import('tailwindcss').Config} */
const CONFIG = {
content: ["./src/**/*.{js,jsx,ts,tsx}", "index.html"],
darkMode: ["selector", '[data-theme="dark"]'],
theme: {
extend: {},
},
Expand Down

0 comments on commit db9da07

Please sign in to comment.