Skip to content

Floating point media queries don't work correctly on iOS #25208

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
arechsteiner opened this issue Jan 5, 2018 · 2 comments
Closed

Floating point media queries don't work correctly on iOS #25208

arechsteiner opened this issue Jan 5, 2018 · 2 comments
Labels

Comments

@arechsteiner
Copy link
Contributor

The floating point media-queries that have been introduced in beta.3 don't work correctly on iPad.

The code generated by media-breakpoint-up and media-breakpoint-down now looks like this:

@media (min-width: 768px) {
  .ipad-media-query-desktop {
    background: blue;
  }
}

@media (max-width: 767.99px) {
  .ipad-media-query-mobile {
    background: blue;
  }
}

Now with these dummy divs you'd expect only one to be blue at any given screen size:

<div class="ipad-media-query-desktop">I'm blue on the big screen</div>
<div class="ipad-media-query-mobile">I'm blue on the small screen</div>

On Chrome this works correctly if you jump back and forth between 767px and 768px, hower on iPad on portrait mode both are blue:

image

@patrickhlauke
Copy link
Member

Fixed via #25177

@arechsteiner
Copy link
Contributor Author

Ah thanks. I searched for "floating" and "media" but couldn't find anything in the issues.

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

3 participants