postcss-preserve-px-fontsize
preserve px font-size from postcss-px-to-viewport, only for vw unit.
Requirement
Must set this plugin after postcss-px-to-viewport.
Usage
const postcss = ;const preserveFontSize = ;const fs = ; const css = fs; ;
input
output
Options
viewportWidth
same as postcss-px-to-viewportlineHeight
boolean, should preserve px unit forline-height
Skip a declaration
Maybe you want to use vw for a specified declaration, you can add a comment /* skipvw */
after the declaration.
This will preserve vw for font-size
.
output