Replies: 1 comment 4 replies
-
|
Add the |
Beta Was this translation helpful? Give feedback.
4 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'm not entirely sure this is a bug, so asking here before opening an issue.)
In my current TW3 setup, I have a custom plugin that mimics Imba's
hueutility (a similar implementation is also available for UnoCSS in this Radix preset).I'm trying to convert it to TW4 with a CSS config, which looks something like this (playground link). This is an abbreviated version, the real one has a
.hue-{color}class for every color in the palette (e.g..hue-red) + every semantic color mapping (e.g..hue-danger):This should work with this HTML:
Almost everything works, but this CSS declaration doesn't work:
because nothing registers the
--background-color-current-hue-elementCSS variable (I expected my last@themedeclaration to do so, second line there).If I change:
it works, but then I lose the
--background-color-current-hue-elementvariable, which I want for other purposes (e.g. easy JS-based reference). I can also register it myself on:root, but that means duplicated code, which I'm not loving.Am I doing something wrong? Is this a bug in TW4? Is there a cleaner way to make this work?
Beta Was this translation helpful? Give feedback.
All reactions