Skip to content

Fix element precision bug in at media CSS elements widths #17388

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

Closed
wants to merge 1 commit into from

Conversation

poulphunter
Copy link

Add more precision with @media (max-width: 33.9em) changed to @media (max-width: 33.999999em).
For bug example : http://v4-alpha.getbootstrap.com/layout/responsive-utilities/ with a layout of 750px, hidden-sm-down and hidden-md-up are visible both.

…(max-width: 33.999999em).

For bug example : http://v4-alpha.getbootstrap.com/layout/responsive-utilities/ with a layout of 750px, hidden-sm-down and hidden-md-up are visible boths.
@cvrebert
Copy link
Collaborator

Partially duplicates #17283.

glebm added a commit that referenced this pull request Aug 31, 2015
Changes grid and container sizes to `px`, as the
viewport pixel size does not depend on the font size.

The actual em values were inconsistent with the docs,
while the docs were also inconsistent with the comments, namely:

* `sm` breakpoint was 34em which is 558px, not 480px.
  Changed to 480px, matching the docs and Bootstrap 3.
* `lg` max width was 60rem which is 960px, less gutter than `md`.
  Changed to 940px, same as Bootstrap 3.
* `xl` max width was 72.25rem which is 1140px not 1156px.
  Changed to 1140px matching the comment but not the docs.

All the values are now the same as they were in Bootstrap 3.
Addresses #17070 and #17388.
@slavanga
Copy link

slavanga commented Sep 1, 2015

Two popular Sass mixins for handling media queries (see below) substract 0.01em by default so I think that should be enough.

https://github.com/sass-mq/sass-mq
https://github.com/eduardoboucas/include-media

@poulphunter
Copy link
Author

1 em ~= 16 px (or 14px) so 1px ~= 0.0625em (0,0714..em).
I agree, 0.01em should be enough.
W3C says : "CSS theoretically supports infinite precision and infinite
ranges for all value types"
So I prefer 0.0000.....1 to be sure this bug will never be back again :)

Le 01/09/2015 11:45, Sergio Lavanga a écrit :

Two popular Sass mixins for handling media queries (see below)
substract 0.01em by default so I think that should be enough.

https://github.com/sass-mq/sass-mq
https://github.com/eduardoboucas/include-media


Reply to this email directly or view it on GitHub
#17388 (comment).

glebm added a commit that referenced this pull request Sep 2, 2015
Changes grid and container sizes to `px`, as the
viewport pixel size does not depend on the font size.

The actual em values were inconsistent with the docs,
while the docs were also inconsistent with the comments, namely:

* `sm` breakpoint was 34em which is 558px, not 480px.
  Changed to 480px, matching the docs and Bootstrap 3.
* `lg` max width was 60rem which is 960px, less gutter than `md`.
  Changed to 940px, same as Bootstrap 3.
* `xl` max width was 72.25rem which is 1140px not 1156px.
  Changed to 1140px matching the comment but not the docs.

All the values are now the same as they were in Bootstrap 3.
Addresses #17070 and #17388.
glebm added a commit that referenced this pull request Sep 8, 2015
Changes grid and container sizes to `px`, as the
viewport pixel size does not depend on the font size.

The actual em values were inconsistent with the docs,
while the docs were also inconsistent with the comments, namely:

* `sm` breakpoint was 34em which is 558px, not 480px.
  Changed to 480px, matching the docs and Bootstrap 3.
* `lg` max width was 60rem which is 960px, less gutter than `md`.
  Changed to 940px, same as Bootstrap 3.
* `xl` max width was 72.25rem which is 1140px not 1156px.
  Changed to 1140px matching the comment but not the docs.

All the values are now the same as they were in Bootstrap 3.
Addresses #17070 and #17388.
glebm added a commit that referenced this pull request Sep 16, 2015
Changes grid and container sizes to `px`, as the
viewport pixel size does not depend on the font size.

The actual em values were inconsistent with the docs,
while the docs were not the same as the comments:

* `sm` breakpoint was 34em (544px) not 480px.
* `lg` container max-width was 60rem (960px), less gutter than `md`.
  Changed to 940px, same as Bootstrap 3.
* `xl` container max-width was 72.25rem which is 1140px not 1156px.
  Changed to 1140px matching the comment but not the docs.

Addresses #17070 and #17388.
glebm added a commit that referenced this pull request Sep 27, 2015
Changes grid and container sizes to `px`, as the
viewport pixel size does not depend on the font size.

The actual em values were inconsistent with the docs,
while the docs were not the same as the comments:

* `sm` breakpoint was 34em (544px) not 480px.
* `lg` container max-width was 60rem (960px), less gutter than `md`.
  Changed to 940px, same as Bootstrap 3.
* `xl` container max-width was 72.25rem which is 1140px not 1156px.
  Changed to 1140px matching the comment but not the docs.

Addresses #17070 and #17388.
@cvrebert
Copy link
Collaborator

Fixed by #17403.

@cvrebert cvrebert closed this Oct 20, 2015
tylerodonnell pushed a commit to picdorsey/frunt that referenced this pull request Nov 5, 2015
Change grid and container sizes to px
twbs/bootstrap@eabed0e

>> Changes grid and container sizes to `px`, as the
viewport pixel size does not depend on the font size.

>> The actual em values were inconsistent with the docs,
while the docs were not the same as the comments:

Also will fix element precision bug in at media CSS elements widths
(twbs/bootstrap#17388)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants