Skip to content

em vs px media queries #22006

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
febLey opened this issue Feb 16, 2017 · 3 comments
Closed

em vs px media queries #22006

febLey opened this issue Feb 16, 2017 · 3 comments
Labels

Comments

@febLey
Copy link

febLey commented Feb 16, 2017

I looked at the bootstrap v4 source and was wondering why you are using px-based media queries, so I dug trough some issues and pull request. So I know that there has been a lot of discussion about this delicate topic (#17403, #17070), but I'd like to revisit the decision of the team.

Like some people mentioned in one the referenced issues the big benefit of em based media queries is that the layout adapts if the user has changed the base font-size, so that the content is presented in a fitting way.

I think there should be at least an variable to switch between em and px-based media queries.

@mdo
Copy link
Member

mdo commented Feb 27, 2017

We'll be sticking with pixels given the previous discussions.

I think there should be at least an variable to switch between em and px-based media queries.

Perhaps in the future, but for now I think we should stick with what we have and get something stable in place first 😁

@mdo mdo closed this as completed Feb 27, 2017
@jasongilmour
Copy link

I'd go as far as suggesting that we should default to EM based media queries based on this article: https://zellwk.com/blog/media-query-units/

I'd be happy to put together a pull request with this change, or adding a variable that sets the unit for breakpoints if it was wanted.

@new-mikha
Copy link

new-mikha commented May 30, 2018

To add to @jasongilmour 's point right above, here is how the stock Bootstrap 4 example from the Bootstrap docs is looking like when the Font Size is set to Very Large in Chrome:
image

That's the very first sample from here:
https://getbootstrap.com/docs/4.1/components/navbar/#nav

I don't think it's right :-/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants