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

Media query causes unexpected parse error #406

Closed
schliflo opened this issue Sep 19, 2023 · 1 comment
Closed

Media query causes unexpected parse error #406

schliflo opened this issue Sep 19, 2023 · 1 comment
Labels

Comments

@schliflo
Copy link

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

@ylafon
Copy link
Member

ylafon commented Sep 20, 2023

This is most probably due to the fact that vendor extensions are not checked, so `@​media and (...) will fail.
Indeed a bug

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

2 participants