You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 10, 2023. It is now read-only.
PostCSS plugin that generates pixel fallbacks for rem units.
Installation
npm install --save pixrem
Usage
Pixrem is a CSS post-processor that, given CSS and a root em value, returns CSS with pixel unit fallbacks or replacements. It's based on browser data so only needed fallbacks will be added. Basically, it's for IE8 or less, and for IE9 & IE10 in the font shorthand property and in pseudo-elements.
rootValue the root element font size. Can be px, rem, em, %, or unitless pixel value. Pixrem also tries to get the root font-size from CSS (html or :root) and overrides this option. Use html option to disable this behaviour.
replace replaces rules containing rems instead of adding fallbacks.
atrules generates fallback in at-rules too (media-queries)
html overrides root font-size from CSS html {} or :root {}
browsers sets browser's range you want to target, based on browserslist
unitPrecision control the significant digits after the decimal point
Contribute
Report bugs and feature proposals in the Github issue tracker. Run tests with npm test. In lieu of a formal styleguide, take care to maintain the existing coding style.