postcss-simple-vars

1.安装
# yarn add postcss-simple-vars -D
2.配置(postcss.config.js)
module.exports = {
  plugins: [
    ...,
    require('postcss-simple-vars')
  ]
}
3.使用
$font: font-;
$m: .m-;
$red: red;

body {
  $(font)family: system-ui;
  color: $red;
}

$(m)txt1 {
  color: green;
}

results matching ""

    No results matching ""