posthtml-px2rem
Change px to rem in HTML inline CSS based on PostHTML
NPM Home Page: https://www.npmjs.com/package/posthtml-px2rem
Install
Install with NPM:
npm install posthtml-px2rem --save
Usage
gulpfile.js
var posthtml = ;var posthtmlPx2rem = ; gulp;
Options
options = lodash
Result
HTML In (Type 1)
<</
HTML Out
HTML In (Type 2)
test
HTML Out
test
Notes
- Ignoring
rem
replacement usingPX
Px
, like123PX
not123px
. - Set
minPixelValue : 2
will ignore all the value1px
&-1.2px
Contributing
This repo is build and maintained by TmT Team.
If you get any bugs or feature requests, please open a new Issue or send us Pull Request, Thank you for your contributions.