[v4] Custom breakpoints paddings are not respected #15450
-
When we have a following class:
The 3xl breakpoint will NOT be respected, instead the lg breakpoint will get the priority, even thought it should use the 3xl breakpoint. NOTE: this happens only for padding, it seems fine for background colors. With the following theme config:
As a workaround i have to specify that 3xl should take priority with the "!" sign:
What version of Tailwind CSS are you using? ^4.0.0-beta.8 What build tool (or framework if it abstracts the build tool) are you using? Nextjs 15.1 What version of Node.js are you using? 22 What browser are you using? Edge What operating system are you using? Windows Reproduction URL Describe your issue Describe the problem you're seeing, any important steps to reproduce and what behavior you expect instead. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hey! We're sorting by the breakpoint value when generating these classes, the issue you're seeing is because you're adding a I recommend setting the custom breakpoint to |
Beta Was this translation helpful? Give feedback.
Hey! We're sorting by the breakpoint value when generating these classes, the issue you're seeing is because you're adding a
px
value where as the default breakpoints are configured inrem
instead. This means the values can't be sorted correctly anymore because of the unit mismatch.I recommend setting the custom breakpoint to
rem
as well so it works as expected: https://play.tailwindcss.com/Zw7yHqbReM