Skip to content

Commit

Permalink
feat: automatic theme switching for Tailwind (#1564)
Browse files Browse the repository at this point in the history
  • Loading branch information
hamirmahal authored Jun 28, 2024
1 parent 69ab157 commit aafed33
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion examples/with-tailwindcss/src/app.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@tailwind utilities;

:root {
--background-rgb: 214, 219, 220;
--foreground-rgb: 0, 0, 0;
}

@media (prefers-color-scheme: dark) {
:root {
--background-rgb: 0, 0, 0;
--foreground-rgb: 255, 255, 255;
}
}

body {
background: rgb(var(--background-rgb));
color: rgb(var(--foreground-rgb));
}

0 comments on commit aafed33

Please sign in to comment.