-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using calc() for columns width #27374
Using calc() for columns width #27374
Conversation
… columns width by themselves
Which browserversion, OS and screenwidth are you testing on? I can't really reproduce this at the moment. |
how to reproduce:
|
Can you try with a different DPI setting too? I've definitely hit similar inconsistencies with rounding on Firefox. |
It is interesting. |
For me 125% on a Windows 7 VM triggered it IIRC. |
I could just reproduce this behaviour with browser zoom. This PR fixes the issue and I think this is a better approach than the rounding we have now. Maybe it's worth reconsidering adding |
We need to check if we have other places we need to do such changes. And we can look into postcss-calc if this lands. |
I did some tests with |
We can look into that later, @MartijnCuppens https://github.com/postcss/postcss-calc#preserve-default-false |
How about other places? I know for sure we use this in embed and we have a ticket for sure. |
Found it #26284 Can someone tackle that in a separate PR too? |
Thanks but that adds another feature too :/ It's always better to split this stuff to be able to merge faster. Anyway, let's not get more sidetracked here :) Thanks for all the help @MartijnCuppens! |
I'm inclined to skip this in v4. It only happens on zooming or non-standard DPIs it seems. I'm also wary of adding calc expressions to all our grid classes (it's a lot of them) for performance reasons. |
i'll just note that increasingly there's no point talking about "non-standard DPIs", as more devices come along with different DPIs and there's no clear "standard DPIs" anymore... |
Yeah, I agree with Patrick on this one. DPIs != 100% will be more and more frequent. |
I made a PR for |
Noted on the DPI conversation. I'm still inclined to leave this as-is, but let me think on it a bit more. |
Let this one sit and coming back to it, going to punt on it. Thanks, though! |
I believe this is worth revisiting for v5. |
oh I mistakenly re-opened this instead of issue. Close this and create a new issue for clarity. |
In Firefox the gird with widths of
*.333333%
have a "half-pixel" issue on certain window widths..To resolve the problem, use css
calc()
to let browsers calculate actual width by themselves instead of hardcoded values.