You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Get rid of dark: classes, who needs it? Before you come at me, just listen me out
Upgrade tailwind configs to be like this:
exportdefault{// darkMode: "class", // Why only dark theme?themes: {dark: "theme-dark"// class namemyTheme: "theme-custom"// class name}theme: {// this can be renamed to style, but for compatibility's sake it should be left as `theme`// extend: {} // Why even have it like this?dark: {// In here should be equivalent to inside `theme` but will only affect the theme `dark`// which is specified in `themes` objectextend: {// styles eg. `colors: {}`}}}}
Why?
Imagine being able to have more than one theme without terrible workarounds like using root variables:
:root[class=theme-custom] {
/* set custom colors for each different theme */
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Get rid of
dark:
classes, who needs it?Before you come at me, just listen me out
Upgrade tailwind configs to be like this:
Why?
Imagine being able to have more than one theme without terrible workarounds like using root variables:
Beta Was this translation helpful? Give feedback.
All reactions