Allow for completely overriding (and/or disabling) the core dark: variant.
#11534
MichaelAllenWarner
started this conversation in
Ideas
Replies: 3 comments 8 replies
|
If I'm not mistaken, simply moving |
0 replies
|
Another thought is something like what I've proposed here for the |
0 replies
|
Already possible: set |
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I think it should be possible to write a completely custom
dark:variant, but right nowaddVariant('dark', /* ... */)does nothing (presumably because the coredark:definition is applied after custom variants are registered).My present motivation is making a "progressively enhanced" dark mode, where the base mechanism relies on
@media (prefers-color-scheme: dark), but where an attribute/class-based mechanism (with higher precedence) is added on top of that if JavaScript is enabled. The trouble is that the available configuration options fordark:aren't up to the task, and I can't override the coredark:variant with custom selectors. I could define a separate variant likedark-mode:that does what I want, but since I can't disabledark:, developers are bound to accidentally use the latter instead of the former.If the TW team were amenable to the idea, I might be able to find time to contribute here.
All reactions