Replies: 2 comments
-
|
The order of classes inside the class attribute doesn't matter in HTML. You shouldn't attempt to apply two utiliies like this and expect one to override the other. You should apply these conditionally — either by:
|
Beta Was this translation helpful? Give feedback.
-
|
In Tailwind, the order of classes in HTML does not determine which one wins. Both w-[50px]! and w-full! generate !important rules in CSS, so the one that appears later in the compiled CSS takes precedence. To make w-[50px] apply, just remove w-full! or only use the utility you need. Relying on HTML class order won’t work with !important. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Whether w-[50px] is placed before or after, it will not cover w-full.
Beta Was this translation helpful? Give feedback.
All reactions