-
Notifications
You must be signed in to change notification settings - Fork 4.6k
One odd utility not generating, is 'heading' a reserved word in V4? #16633
Replies: 1 comment · 7 replies
-
Hey! Seems to be working fine in the playground: https://play.tailwindcss.com/qDmtZehA0q?file=css mind adding a repro that we can run locally? |
Beta Was this translation helpful? Give feedback.
All reactions
-
Ideally you can reproduce your exact setup in a smaller github repository that we can run locally that only contains the code absolutely necessary to reproduce the issue, so we can look into it without having to acquire knowledge about your app.
Is there anything else in this TWIG file? |
Beta Was this translation helpful? Give feedback.
All reactions
-
@philipp-spiess I see, I probably won't have the time at this current moment to do so. Instead I'll just keep an eye on this one and if it happens again I'll be sure to provide more detail. I feel like I've had weird anomalies like this before, where there's no (obvious) reason why a class shouldn't generate. Even a restart of Here's my TWIG file if it helps, that matches the screenshot above.
|
Beta Was this translation helpful? Give feedback.
All reactions
-
@philipp-spiess found the issue. Basically inside of my nav.css, I have a block that uses the utility in an @apply (something I try not to do often but was working fine in v3).
When it's used in this way, it essentially breaks the whole utility (except when using md: / lg: etc). As mentioned, this pattern was working fine before the upgrade and I'm not too fussed as I can easily inline. But just in case this is related to anything else, I thought I'd mention for your oversight. Thanks |
Beta Was this translation helpful? Give feedback.
All reactions
-
👀 1
-
@rhysmatthew Awesome find! I tried to get the repro for this working but it seems that a bit more is necessary: https://play.tailwindcss.com/k5t1KfegOR?file=css Do you have any idea what else it could be in your setup that makes it not work? Is the |
Beta Was this translation helpful? Give feedback.
All reactions
-
👀 1
-
@philipp-spiess Yeah that seems a bit odd then, definitely something else causing it. Does it help if I share my entire CSS folder? My main app.css file is imported into my JS and then processed through ViteJS. P.s. I'm aware using excessive amounts of @apply isn't ideal, but I still prefer to work this way with TW. I mostly use inline TW though. Potentially it's PostCSS related? I've tried disabling postcss-pxtorem and autoprefixer and cancelled those out.
|
Beta Was this translation helpful? Give feedback.
All reactions
This discussion was converted from issue #16632 on February 18, 2025 13:45.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Tailwind version V4
Node: 22
I have my utilities from previous versions of Tailwind, and after upgrading I've noticed the word 'heading' doesn't generate or work properly.
I.e. I have several utils like so:
However when using in my templates heading does not generate correctly i.e.
<p class="heading">
doesn't get any styles applied. Another oddity is that if I introduce a breakpoint it does generate i.e.<p class="md:heading">
. Whereas subtitle and subheading work fine, along with the others I have set up.Any help on what could be happening would be much appreciated. I don't want to simply rename as this was working fine before and would require a pattern change throughout dev and design.
Beta Was this translation helpful? Give feedback.
All reactions