postcss-plugin-extract-theme
v1.1.1
Published
-------------------------------
Downloads
3
Readme
postcss-plugin-extract-theme
extract target color and extract target color for genrate theme.
Example
.test {
color: #fff;
}
will be transform to light theme
and dark theme
:
.test {
}
.light .test {
color: #fff;
}
.light .test {
color: #000;
}
Installation
npm install postcss-plugin-extract-theme --save-dev
Usage
config postcss.config.js
// postcss.config.js
module.export = {
plugins: {
'postcss-plugin-extract-theme': {
rulesMap: {
'#fff': '#000',
},
themeNames: ['light', 'dark'],
output() {
// something
}
}
}
}