Sharing component classes across files #3044
mrtnbroder
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Hey 👋 In @import "tailwindcss/base";
@import "tailwindcss/components"; ? If you could setup a little minimal reproduction of this issue to look at, that would be super helpful 👍 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there!
first, let me say that tailwindcss is just awesome. Loving it so far!
I was looking into extracting common components into their own classes, just like mentioned here. My main styles file for that looks like this:
styles.css
:Text/index.css
:Now here comes my "issue" or idea. Unfortunatly it's not possible atm how it looks like (without writing it as a plugin).
My
Link
component shares the same base styles with.Text
, so I tried the following:Link/index.css
:But that throws an error:
As you can see in my main
styles.css
,Text
is clearly imported beforeLink
, so it should be possible to use@apply
. Maybe I'm missing something but it doesn't look supported atm. Would be cool if it did though.Thanks!
Beta Was this translation helpful? Give feedback.
All reactions