css-custom-properties-transform
v1.2.1
Published
Allow transformation of color values from hex to rgb and their usage in CSS Custom Properties
Maintainers
Readme
CSS Custom Properties transform
Allow transformation of color values from hex to rgb and their usage in CSS Custom Properties.
This module accepts both a String or an Object as input.
Accepting a String allows the module to be used with Webpack's Style loader.
Installation
npm i -D css-custom-properties-transformExample usage: passing an Object
customPropertiesTransform( {
cssFiles: [
'*.css',
'css/**/*.css',
'css/style-{elektron,elements}.css'
]
} );Example usage: passing a String
const styleLoader = {
loader: 'style-loader',
options: {
transform: 'node_modules/css-custom-properties-transform/index.js'
}
}