Angular utility class in component's css #16204
Replies: 1 comment 7 replies
-
You probably need to use the As an aside, Adam Wathan (creator of Tailwind) does seem to advocate avoiding |
Beta Was this translation helpful? Give feedback.
7 replies
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.
-
I followed the guide to create a new Angular app and install TW4, and it works.

After that I created a new component, and if I use come utility class in the html file it still works, but if I use the
@apply
directive in the css file with any of the utility classes I get compilarion error:In that css file I have to use

@import
ad choose the style.css file. But importing in each needed css file the main css file means all the classes already defined in that file will be duplicated in the bundle:What's the correct way to use TW4 in Angular?
Beta Was this translation helpful? Give feedback.
All reactions