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

v4 - Change media query breakpoint units from em to px #17366

Closed
niutech opened this Issue Aug 27, 2015 · 6 comments

Comments

Projects
None yet
5 participants
@niutech

niutech commented Aug 27, 2015

Bootstrap 4 uses em units when setting breakpoints in media queries, which is inconsintent with screen sizes mesured in px and adds unnecessary complexity when converting from px to em. Does @media (min-width: 48em) {} equal well-known 768px? It is hard to tell from the first sight.
Therefore I am asking to bring back the old pixel units in media query breakpoints, unless there is an important reason not to do so. The old bug with zooming in was fixed long time ago.

Even @mdo (project owner) said:

Nope, no em units. They complicate simple values and scales unnecessarily and for little reward. Pixels are fine as browsers just zoom the page without any problem.

and:

Pixels provide absolute control and consistent rendering across every browser.
Designers still mostly think and operate in pixels.
Browsers scale up entire pages these days, so it's not an issue with type scaling or anything.
(...)
In the future, we'll likely use ems for type sizing, perhaps rems even, but not for anything else. This is also debatable on font sizes for inputs and the like. It's just not how folks build pixel perfect sites.

@kkirsche

This comment has been minimized.

Show comment
Hide comment
@kkirsche

kkirsche Aug 27, 2015

Contributor

Is this a duplicate of #17070?

Contributor

kkirsche commented Aug 27, 2015

Is this a duplicate of #17070?

@niutech

This comment has been minimized.

Show comment
Hide comment
@niutech

niutech Aug 27, 2015

This issue is specifically about media queries, not font sizes.

niutech commented Aug 27, 2015

This issue is specifically about media queries, not font sizes.

@cvrebert cvrebert added css v4 labels Aug 27, 2015

@mdo

This comment has been minimized.

Show comment
Hide comment
@mdo

mdo Sep 2, 2015

Member

Closing for #17403, which will very likely merge.

Member

mdo commented Sep 2, 2015

Closing for #17403, which will very likely merge.

@mdo mdo closed this Sep 2, 2015

@DanielPintilei

This comment has been minimized.

Show comment
Hide comment
@niutech

This comment has been minimized.

Show comment
Hide comment
@niutech

niutech Mar 18, 2016

I'm still certain that screen sizes are measured in px, and so should media queries be measured.

niutech commented Mar 18, 2016

I'm still certain that screen sizes are measured in px, and so should media queries be measured.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Mar 29, 2016

@niutech I'm still certain you haven't read Daniel's link.

ghost commented Mar 29, 2016

@niutech I'm still certain you haven't read Daniel's link.

@twbs twbs locked and limited conversation to collaborators Mar 29, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.