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
feat(directives): support theme()
function
#1005
Conversation
✅ Deploy Preview for unocss canceled.
|
There seems to be some problems with ci testing, the last few ci jobs have failed. |
test/transformer-directives.test.ts
Outdated
color: theme(\\"color.none.500\\"); | ||
font-size: theme(\\"size.lg\\"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we throw on none-exist utils?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we throw on none-exist utils?
I think it would be better to keep the non-existent utils to better troubleshoot the problem.
The multiple parameters feature feels a bit confusing to me, since ppl might expect to use space or comma for the conjunction base on their needs. I think either Tailwind or Windi support that usage currently, I'd prefer to not have it for the initial implementation (we could discuss in other issue) I will work on this PR directly and handle the rest. |
Ok, I didn't notice that they don't support multiple parameters. |
close: #982
Related docs: https://windicss.org/features/directives.html#theme
theme()
function directive, which allows multiple parameters.