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
The "class" strategy (mentioned in the next-themes README) still exists for backward-compatibility, and under the hood it still does addVariant('dark', `:is(${selector} &)`).
The new "selector" strategy is meant to replace the "class" strategy going forward. It behaves similarly, but it has reduced specificity and is a little more flexible: addVariant('dark', `&:where(${selector}, ${selector} *)`).
The new "variant" strategy allows for total customization of the dark: variant: addVariant('dark', selector).
The new strategies aren't yet documented on the Tailwind website, but they were shipped in v. 3.4.1. (A slightly different version shipped in 3.4.0, but it had problems.)
The README for this repository should probably be updated accordingly.
The text was updated successfully, but these errors were encountered:
I really don't care for this attitude @joshuawootonn. As you can see there is an open PR for the documentation changes (in the thread above your first comment).
Paco (the code-owner) has been unreaponsive for many months and thus no changes/fixes have been merged for quite some time, as they'd need his approval.
Fair enough. I was in a spicy late night mood. Not helpful especially since the maintainer isn't responding. Sorry y'all. Probably wouldn't have posted normally. It just felt like an easy change.
Thanks for contributing the update though. Hope it get's merged soon!
Tailwind recently changed their dark-mode API:
next-themes
README) still exists for backward-compatibility, and under the hood it still doesaddVariant('dark', `:is(${selector} &)`)
.addVariant('dark', `&:where(${selector}, ${selector} *)`)
.dark:
variant:addVariant('dark', selector)
.The new strategies aren't yet documented on the Tailwind website, but they were shipped in v. 3.4.1. (A slightly different version shipped in 3.4.0, but it had problems.)
The README for this repository should probably be updated accordingly.
The text was updated successfully, but these errors were encountered: