Custom breakpoints don't work unless specified with same units as default #17957
Replies: 1 comment
-
You still have the same problem in v3 - except the breakpoint units all need to be If you want to use
|
Beta Was this translation helpful? Give feedback.
-
What version of Tailwind CSS are you using?
v4.0.5
What build tool (or framework if it abstracts the build tool) are you using?
@tailwindcss/postcss 4.1.5
What version of Node.js are you using?
For example: v16.0.0
What browser are you using?
Firefox
What operating system are you using?
macOS
Reproduction URL
https://play.tailwindcss.com/6KFqtQPzUW
Observe that the colour of the container is blue, and not yellow, as expected.
Describe your issue
When creating custom breakpoints to extend the existing breakpoints, the generated classes don't take proper precedence over the default ones if using different units than
rem
.I had added
--breakpoint-3x: 1920px
and--breakpoint-4xl: 2560px;
, but the default breakpoint of2xl
seems to always take precedence over them. It seems like postcss generates them in the order of unit size, but does not take differing units into account. This is a regression from Tailwind 3, where this used to work.Beta Was this translation helpful? Give feedback.
All reactions