You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using postcss-import to import classes from separate file and I use my custom plugin to generate classes.
Both of this methods work, but using it with Tailwind is not quite.
Tailwind doesn't see those classes inside it's components layer and I cannot access them with @apply.
I reproduced similar to my setup in this repository: https://github.com/alexanderkalachev/postcss-generate-classes-in-tw-layers
It's Next.js app with PostCSS and Tailwind.
You can find two css files inside 'app' directory: globals.css and partial.css
I use postcss-import to include partial.css in globals.css.
Then I generate two additional classes with custom plugin in 'plugins/custom-plugin.js'.
Then inside globals.css I trying to access different classes inside https://github.com/layer components. Each class represent a way to add a component that doesn't work.
Thank you! Please, let me know if you can spot my mistake.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm using postcss-import to import classes from separate file and I use my custom plugin to generate classes.
Both of this methods work, but using it with Tailwind is not quite.
Tailwind doesn't see those classes inside it's components layer and I cannot access them with @apply.
I reproduced similar to my setup in this repository: https://github.com/alexanderkalachev/postcss-generate-classes-in-tw-layers
It's Next.js app with PostCSS and Tailwind.
You can find two css files inside 'app' directory: globals.css and partial.css
I use postcss-import to include partial.css in globals.css.
Then I generate two additional classes with custom plugin in 'plugins/custom-plugin.js'.
Then inside globals.css I trying to access different classes inside https://github.com/layer components. Each class represent a way to add a component that doesn't work.
Thank you! Please, let me know if you can spot my mistake.
Beta Was this translation helpful? Give feedback.
All reactions