Skip to content

Commit 4b04512

Browse files
Dark Mode Selector (#151)
2 parents 7bffda9 + b1fa559 commit 4b04512

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

tailwind.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ import tailwindCssAnimate from 'tailwindcss-animate';
88

99
const config: Config = {
1010
content: ['./src/**/*.{js,ts,jsx,tsx}'],
11+
// Use selector-based dark mode so `dark:` variants activate when the `.dark` class is on <html>,
12+
// matching how Paranext toggles the theme at runtime.
13+
darkMode: 'selector',
1114
// Prefix on all tailwind classes so they don't clash with built-in classes
1215
// short for tailwind - we hope to have the same prefix as users of this library so the cn
1316
// function that uses tailwind-merge can properly overwrite related tailwind classes

0 commit comments

Comments
 (0)