1.2.1 • Published 5 years ago

css-custom-properties-transform v1.2.1

Weekly downloads
-
License
GPL-3.0
Repository
bitbucket
Last release
5 years ago

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-transform

Example 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'
    }
}
1.2.1

5 years ago

1.2.0

5 years ago