Replies: 1 comment 3 replies
-
You can't remove it via Tailwind alone but you could have one of the themes as the "default" case in @theme. Red for example: @theme {
--text-color-primary: green;
}
* {
[data-theme='blue'] & {
--text-color-primary: blue;
}
} Otherwise, you can process the CSS after Tailwind has built it to remove the obsolete declaration.
@theme inline {
--text-color-primary: var(--text-color-primary);
} Nope doesn't work, since it needs to reference itself |
Beta Was this translation helpful? Give feedback.
3 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.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a variable that's set up like this
To use this custom property as a utility class
.text-primary
, I have the following@theme
config:Note how the custom property names are the same, because of similar naming conventions.
Here's the generated output CSS, which I want to disable, since it's redundant for my use case.
What's the recommended way to handle this?
Beta Was this translation helpful? Give feedback.
All reactions