Skip to content

Media query causes unexpected parse errorΒ #406

Closed
@schliflo

Description

@schliflo

Firstly thanks for this incredibly useful tool!

I think I found a bug when using a specific media query:

This code produces a Parse Error:

@media (-webkit-min-device-pixel-ratio: 1.5) and (min-width: 320px), (min-resolution: 144dpi) and (min-width: 320px) {
    body {
        color: red
    }
}

while prefixing the same query with any media type like all and it is considered valid:

@media all and (-webkit-min-device-pixel-ratio: 1.5) and (min-width: 320px), (min-resolution: 144dpi) and (min-width: 320px) {
    body {
        color: red
    }
}

I think both versions should be valid, as the all media type is implicitly implied when omitted as in my first snippet: https://developer.mozilla.org/en-US/docs/Web/CSS/@media#media_types

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions