-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aliases as rules / Hues as aliases #2
Comments
I thought about this a little bit. here is what I found.
for it to work we need to generate this CSS:
and then have some rules to handle
So they can pick up the hue and use it. |
CSS vars wise it'd actually be essentially the same code as hues right now, just subbing in another part of the rule in the generated CSS. I would need to find a way to dynamically add or detect the colors though, Is responsible for generating a "scale" that represents the current hue value. I think uno may give some sort of hook that returns which rules get used, or which colors, which might give an avenue to adding the colors that get made by |
yeah, with adding colors dynamically, you don't need to select colors in config. I guess you currently add all 12 levels of a color if it's in the selected colors. BTW it would be nice to add "lightSelector". It's useful when you want to force lightmode in page/section or when you want to auto/OS option beside light and dark. |
What's blocking you from using it right now? |
I don't have time to scope and impl this atm, contribution would be welcome. |
Didn't know that. Amazing! |
It could be useful to be able to define aliases inline, which would also perhaps be used to power
hue
functionality.something like
alias-danger-red
as a rulename. This would more or less replacehue
in-place if a shortcut forhue-
->alias-hue-
was set up, and would allow stuff likehue5-blue
or etc if multiple hues are required to power a hue combination.The text was updated successfully, but these errors were encountered: