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

Support (500px <= width) syntax #47

Open
lschmelzeisen opened this issue May 2, 2023 · 2 comments
Open

Support (500px <= width) syntax #47

lschmelzeisen opened this issue May 2, 2023 · 2 comments

Comments

@lschmelzeisen
Copy link

The following transformation works as expected:

@media (width >= 500px) {}
/* becomes: */
@media (min-width: 500px) {}

However, I just noticed, that the following does not work:

@media (500px <= width) {}
/* does not become the following: */
@media (min-width: 500px) {}

To my understanding also the latter syntax is expected to work according to Example 16 of Media Queries Level 4 and at least Firefox and Chrome already understand it.

@lschmelzeisen lschmelzeisen changed the title Support (500px <= width) syntax Support @media (500px <= width) syntax May 2, 2023
@lschmelzeisen lschmelzeisen changed the title Support @media (500px <= width) syntax Support (500px <= width) syntax May 2, 2023
@romainmenke
Copy link

Hi @lschmelzeisen,

We fixed this issue in this PR : #44

Because we used postcss-media-minmax in postcss-preset-env we wanted to get this fix and others out to our users. So we released our updated version as a separate package.

You could use that version until the maintainers here have time again.

@lschmelzeisen
Copy link
Author

Hey @romainmenke, great, thank you! I have switched my code to using your fork for now, as I have much more confidence with your rewrite instead of a regex-based implementation. Also I commend your efforts in pushing this back upstream 👍

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

No branches or pull requests

2 participants