0.0.1 • Published 3 years ago

postcss-pxtorem-multi-value v0.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

postcss-pxtorem-multi

A plugin for PostCSS that support multiple rootValue based on pxtorem

Install

$ npm install postcss-pxtorem-multi --save-dev

Usage

  1. set options which is pxtorem's option array added type
[{
  type: 'phone',
  rootValue: 16,
  unitPrecision: 5,
  selectorBlackList: [],
  propList: ["font", "font-size", "line-height", "letter-spacing"],
  replace: true,
  mediaQuery: false,
  minPixelValue: 0,
  exclude: null
}, {
  type: 'pad',
  rootValue: 20,
  unitPrecision: 5,
  selectorBlackList: [],
  propList: ["font", "font-size", "line-height", "letter-spacing"],
  replace: true,
  mediaQuery: false,
  minPixelValue: 0,
  exclude: null
}]
  1. add remark on css file head:root value ${type}

The plugin will use corresponding option in prev step to generate rem