postcss-pxtorem icon indicating copy to clipboard operation
postcss-pxtorem copied to clipboard

Media queries should be in em not rem

Open lucadegasperi opened this issue 9 years ago • 1 comments

Since all media queries level one units are relative to the root element, setting the media queries in rems instead of ems, is useless and reduces the support for media queries in browsers like safari 5 (which do support rems but not in media queries)

lucadegasperi avatar Feb 11 '16 18:02 lucadegasperi

Desktop Safari also has issues with rem in media queries. em are a safer choice: https://danburzo.ro/media-query-units/#the-trouble-with-safari-again-:~:text=The%20trouble%20with%20Safari%20(again)

Although there is https://www.npmjs.com/package/postcss-em-media-query which can be used alongside this plugin :)

philwolstenholme avatar Mar 15 '21 19:03 philwolstenholme