A plugin for PostCSS that generates viewport units (vw, vh, vmin, vmax) from pixel units. The best choice to create a scalable interface on different displays by one design size.
Some apis of postcss5 have been deprecated, and will console following warning:
postcss-px-to-viewport: postcss.plugin was deprecated.
I upgraded it from postcss5 to postcss8, and test cases are all passed.
The main modifications are to use exports.default = creator instead of exports.default = postcss.plugins(name, creator), and remove var postcss = require('postcss'); in index.js.
Some apis of
postcss5
have been deprecated, and will console following warning:I upgraded it from
postcss5
topostcss8
, and test cases are all passed.The main modifications are to use
exports.default = creator
instead ofexports.default = postcss.plugins(name, creator)
, and removevar postcss = require('postcss');
inindex.js
.