- Notifications
You must be signed in to change notification settings - Fork3.4k
Tailwind classes not applied in Angular 19.2, Tailwind 4.0, Cypress 14#31444
-
Hi all, Any ideas on what's missing to get Tailwind 4.0 classes working with Component Testing? Tailwind classes not appliedStack
styles.scss@use"tailwindcss";@use"primeicons/primeicons.css";html {font-size:14px;font-family:'Inter', sans-serif;font-optical-sizing: auto;font-style: normal;background-color:var(--p-surface-50);}h1 {font-size:2.286rem;}h2 {font-size:1.714rem;font-weight:700;margin:1.5rem0;}h3 {font-size:1.429rem;} |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 1 comment
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
It seems you are using primeng on top. I had a similar problem - maybe the same.
The cli is used to generate a compiled version of the styles.scss before cypress is launched by extending the start script in
Then, in my
I hope I mentioned everything that was existential to get the component tests running. Btw: Do not use // comments on your styles.scss as the tailwind compiler generates a one liner for the whole file. That means, putting a // anywhere causes the rest of the file being part of the comment! Edit: As I wrote the example, I actually updated my code form prime-icons 6 to 7 and encountered some issues later with the way to import the icon styles. Different from the documentation it works for me bynot importing it in the scss but putting it in the styles of the build options. |
BetaWas this translation helpful?Give feedback.