postcss / autoprefixer

Parse CSS and add vendor prefixes to rules by Can I Use
https://twitter.com/autoprefixer
MIT License
21.66k stars 1.26k forks source link

feat: add `dppx` when the browser does not support the `x` unit in resolution media queries #1468

Open yisibl opened 2 years ago

yisibl commented 2 years ago

css-values-4 adds x as an alias for dppx unit, but not every browser in media queries supports x unit. So I think it would be better to add a fallback for x unit.

x unit support in: Chrome 68+, Edge 79+, Opera 55+, Safari 16+, Firefox 62+

See also:

image
yisibl commented 2 years ago

I have added a PR of x unit for caniuse as well. https://github.com/Fyrd/caniuse/pull/6381