Breakpoint sequence off for pixel values #18279
Unanswered
scheinercc
asked this question in
Help
Replies: 1 comment 1 reply
-
So for breakpoints to work properly, you need to use the same units. So, if you're using built-in breakpoints alongside, you should use |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What version of Tailwind CSS are you using?
For example: v4.1.8
What build tool (or framework if it abstracts the build tool) are you using?
postcss-cli 11.0.1
What version of Node.js are you using?
v22.14.0
What browser are you using?
Firefox Dev, Chrome
What operating system are you using?
macOS
Reproduction URL
A Tailwind Play link: https://play.tailwindcss.com/JwD8bUESaW
In the root
<div>
I addedsm:w-100 min-[45rem]:w-200 min-[800px]:w-300
.Describe your issue
Based on the browsers' default 16px for 1rem, the
sm
selector should be first in the generated file, themin-[45rem]
second, andmin-[800px]
last.You can see in the screenshot that this is not the case, and the pixel value comes first.
Here are examples from a project.
lg:
vsmin-[1665px]
lg:
vsmin-[104rem]
Both should be in the same sequence.
In order to get the media queries into the correct sequence, the pixel values need to be changed into their corresponding
rem
values.FYI, the example in the docs for arbitrary values uses
px
values, which indicates they should play nicely together: https://tailwindcss.com/docs/responsive-design#using-arbitrary-valuesBeta Was this translation helpful? Give feedback.
All reactions