Skip to content
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

Merged
merged 6 commits into from May 25, 2022

Conversation

Dunqing
Copy link
Member

@Dunqing Dunqing commented May 25, 2022

close: #982
Related docs: https://windicss.org/features/directives.html#theme

  • Improved implementation of directives to support easier addition of directives
  • Supports the theme() function directive, which allows multiple parameters.

@netlify
Copy link

netlify bot commented May 25, 2022

Deploy Preview for unocss canceled.

Name Link
🔨 Latest commit 00f20b6
🔍 Latest deploy log https://app.netlify.com/sites/unocss/deploys/628dc76c2c65d1000860de54

@Dunqing
Copy link
Member Author

Dunqing commented May 25, 2022

There seems to be some problems with ci testing, the last few ci jobs have failed.

Comment on lines 418 to 419
color: theme(\\"color.none.500\\");
font-size: theme(\\"size.lg\\");
Copy link
Member

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?

Copy link
Member Author

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.

@antfu
Copy link
Member

antfu commented May 25, 2022

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.

@Dunqing
Copy link
Member Author

Dunqing commented May 25, 2022

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)

Ok, I didn't notice that they don't support multiple parameters.

@antfu antfu enabled auto-merge (squash) May 25, 2022 06:06
@antfu antfu merged commit ab4d040 into unocss:main May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TailwindCSS importing colors within scss
2 participants