Support (500px <= width) syntax
lschmelzeisen opened this issue · comments
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.
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.
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 👍