You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think there are legit use cases for this, like building a border with box-shadow that doesn't take space and doesn't antialias, reserving space for another thin border...
This is already exposed in a way, both via media queries, and due to the border-snapping rules we have (e.g. border: 0.01px will compute to a different thing depending on the device pixel ratio).
But if you want to do something like that, media queries are not enough, because you can only build for the most common DPIs:
Would address this kind of use case. I'm not convinced the unit is quite worth it because the use case is somewhat niche, tho, and it kinda makes it too easy to swap px by dpx accidentally (99% of the time you do want CSS pixels...).
The text was updated successfully, but these errors were encountered:
I think there are legit use cases for this, like building a border with
box-shadow
that doesn't take space and doesn't antialias, reserving space for another thin border...This is already exposed in a way, both via media queries, and due to the border-snapping rules we have (e.g.
border: 0.01px
will compute to a different thing depending on the device pixel ratio).But if you want to do something like that, media queries are not enough, because you can only build for the most common DPIs:
I think either:
env(resolution)
that evaluates to a number.dpx
or so?).Would address this kind of use case. I'm not convinced the unit is quite worth it because the use case is somewhat niche, tho, and it kinda makes it too easy to swap
px
bydpx
accidentally (99% of the time you do want CSS pixels...).The text was updated successfully, but these errors were encountered: