Replies: 1 comment 1 reply
-
You can do this with @utility foo {
@layer components {
color: black;
}
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Previous to v4, you could define plugins with addComponents which would allow you to say use components with variants and arbitrary variants. This would allow you to style markup differently based on viewport
link sm:btn
or create a styled form template similar to:Using
@layer component
doesn't give you the same opportunity. I would suggest introducing a directive@component
which worked in a similar manner to@utility
generating variants on top of the components layer. There are cases where you would want a component to be predictably overridden by a utility, but the component itself also be allowed to utilize variants.Beta Was this translation helpful? Give feedback.
All reactions