-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
[Feature] : Pass the prop directly to the TailwindCSS #36
Comments
Not currently possible @alamenai as text-[sm] doesn't work as far as I am aware in Tailwind. As Tailwind would treat sm as a custom value and add that to the styles. |
@alamenai I will take a look into this as playing with tailwind v4 the apply directive is deprecated so i will have to see if there is a better solution. |
Hi @alamenai That's quite smart 👍 However, one of the design goal of MistCSS that I'd like to keep is not have to transform CSS, just pure CSS. Regarding @apply, they're recommending tailwindlabs/tailwindcss#13064 .card {
background-color: theme(colors.white);
border-radius: theme(borderRadius.lg);
padding: theme(spacing.6);
box-shadow: theme(boxShadow.xl);
} It would be great if the Tailwind example in the doc could be updated though. |
Yeah I agree with what @typicode said I completely forgot they added theme, I will write a v4 section into the tailwind docs, In regards to dynamic stuff like that I would say it should be done using the classname param rather than adding some complex dynamics into the renderer. |
Closing as v1 is quite different. I'm not sure with the current state of CSS that it's possible to do. |
Hi @typicode ,
Thank you for this new library.
I like the idea of generating components from CSS instead of integrating CSS in JS.
Honestly, adding CSS to JS is kind of a mess.
I already started using the library (or tool), however, while I was trying to discover the syntax, an idea came to me and I wanted to share it if it is possible to implement it.
In the code above, yu see that we repeating the prop checking to apply the TailwidCSS, is it possible to make it like this :
The text was updated successfully, but these errors were encountered: