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

Is there a way to get a function to convert tailwind classes into CSS. #1376

Closed
GTDev87 opened this issue Feb 9, 2020 · 1 comment
Closed

Comments

@GTDev87
Copy link

GTDev87 commented Feb 9, 2020

Feature Idea.

I like using CSS in JS features and I have used Babel Plugin Tailwind Components, but it seems that the project is a bit behind in the version and I'm having some trouble using the next branch see here.

I was wondering if there is a way to expose a function for javascript that would convert a tailwind css class into js like the @apply function so I can use it in my JSX. I know this is outside the scope of the project a bit but it could help the Babel Plugin Tailwind Components repo and also it would help me if I can just run it myself without a String Literal in my own codebase.

Thanks

@adamwathan
Copy link
Member

Best bet is probably a custom tool that uses PostCSS to try and find a matching class and grab the declarations. Unfortunately not something I can prioritize including in Tailwind itself or providing a first-party solution for any time soon 😞

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

No branches or pull requests

2 participants