evrone / postcss-px-to-viewport

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.
https://evrone.com/postcss-px-viewport
MIT License
2.99k stars 401 forks source link

feat: support array format for unitToConvert option #122

Open huhm opened 2 years ago

huhm commented 2 years ago

Use Case

My Project has some code like this:


.font-14 {
  /* prettier-ignore */
  font-size: 14PX;
}

The plugin willl ignore the px convertor ,because 'px'!=='PX'. and then someday I have convert the PX too,but still let it avaliable to rolling-over,so I can't change the source. then there is a place for the unitToConvert: ["px","PX"]