Skip to content
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

Add support for logical operators in media queries passed in sizes strings #266

przemyslaw-piatek opened this issue Mar 19, 2015 · 1 comment


Copy link

przemyslaw-piatek commented Mar 19, 2015

As a developer, I'd like to be able to use logical operators in media queries passed in "sizes" strings.

<img sizes="(min-width: 30em) and (max-width: 50em) 1000px, 500px" srcset="pict1.jpg 500w, pict2.jpg 1000w" alt="Lorem ipsum">

This works natively in latest Chrome release.

W3C specs do not and probably will not disallow this:

Plus it complies with current & future MQ specs:

Copy link

tabatkins commented Mar 19, 2015

This is already allowed per spec, because we just reference <media-condition>, and that's defined in MQ4 to allow boolean algebra.

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

No branches or pull requests

2 participants