-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
down
or only
breakpoint still applies on upper breakpoint
#11313
Comments
ncoden
added a commit
to ncoden/foundation-sites
that referenced
this issue
May 31, 2018
…n#11313 As seen in foundation#10978, we need a subpixel precision to handle zoomed browsers. But browsers handle sub-pixel mediaqueries badly and a too high precision causes the issue described above. So we have to find the proper balance for a maximum support. Changes: * set breakpoint max values to `0.00125em` (`0.02px`) under the next breakpoint instead of `0.00001`. Closes foundation#11313
14 tasks
I would be tempted to defer to the bootstrap approach -- my assumption is that it will have already been thoroughly tested by that community if it is in production. |
@JasonMiller I agree. I opened a PR with |
Awesome, thanks for the quick follow-up! |
ncoden
added a commit
that referenced
this issue
Jun 1, 2018
…ion-11313 fix: lower breakpoint max value precision to avoid rounding #11313
ncoden
added a commit
to ncoden/foundation-sites
that referenced
this issue
Jun 16, 2018
…h-precision-11313 for v6.5.0 798377d fix: lower breakpoint max value precision to avoid rounding foundation#11313 a36504c fix: revert mistakenly changed `$global-flexbox` setting in foundation#11315 Signed-off-by: Nicolas Coden <nicolas@ncoden.fr>
This was referenced Jun 16, 2018
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As reported by @JasonMiller at #10978 (comment), the new breakpoint precision (
0.0001em
) introduce a new bug on all major browsers (Chrome, Firefox, Safari...).What should happen?
For the following code:
Properties should be applied for
medium and under
, so for a resolution strictly inferior to1024px
.What happens instead?
Due to the breakpoint
63.99999em
being rounded to64em
by most browsers for their breakpoint calculations, properties are still applied on thelarge
breakpoint for1024px
exactly.This issue is related to:
max-width
Values #10978 Fix breakpoints precision issue with a smaller global font size (@JasonMiller)Possible Solution
As seen in #10978, we need a subpixel precision to handle zoomed browsers. But browsers handle sub-pixel mediaqueries badly and a too high precision causes the issue described above. So we have to find the proper balance for a maximum support.
After some research across their own issues (twbs/bootstrap#19197), I took a look at the way Bootstrap handle this (cc @cvrebert @mdo). Here is the description of their Sass
breakpoint-max
function.So they use a precision of
0.02px
, it would be something like0.00125em
for us, which is close to the0.001
proposed by @JasonMiller. I would agree to adopt this constant, still we need to do some tests to ensure that the em-px conversion is correctly made by browsers.Your Environment
develop
Checklist (all required):
The text was updated successfully, but these errors were encountered: