MathiasGilson / Tailwind-Styled-Component

Create Tailwind CSS React components like styled components with class names on multiple lines and conditional class rendering

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add CSS to tailwind styled component

aidan-rypens opened this issue · comments

Is it possible to add CSS to a tailwind styled componet (not extend)? Combining both CSS and tailwind classes would be nice!

No because tailwind properties are actually CSS classes and CSS pure css would be CSS properties which are not compatible.

It would require extracting the CSS properties out of the tailwind class names.

You can submit a PR but I feel that extending a custom styled component is the cleanest way to do it.

Thanks for following up!

Yes, but sometimes not everything is do-able with tailwind and doing it with an extend takes a bit of the 'cleanliness' away in my part as you have a few extra lines and not have sort of a quick view of the actual generated css.

But thanks for having a look. Maybe it is just my way of working and not everyone's problem.