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:
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: