postcss-skin
Dynamically create different skin/theme style with data.
For Sass
skin-loader, base on Sass, Webpack
Installation
npm install --save-dev postcss-skin
Plugin Options
prefix
For avoid the conflict of name.
- Type:
String
- Default:
'$'
- Required:
false
prefix: '$'
How To Use
App.jsx
import React Component from 'react'; import temp from 'postcss-skin/lib/temp'; ; {...} ;
App.scss
.cus-skin-part @supports (display: block)
webpack.config.js
module: rules: test: /\.scss$/ use: 'style-loader' 'css-loader?minimize' 'resolve-url-loader' loader: 'postcss-loader' options: plugins: 'sass-loader'