Skip to content

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

Closed
@przemyslaw-piatek

Description

@przemyslaw-piatek

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

<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:
http://www.w3.org/html/wg/drafts/html/master/semantics.html#attr-img-sizes

Plus it complies with current & future MQ specs:
http://drafts.csswg.org/mediaqueries/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions