css-custom-properties-transform

1.2.1 • Public • Published

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

Package Sidebar

Install

npm i css-custom-properties-transform

Weekly Downloads

2

Version

1.2.1

License

GPL-3.0

Unpacked Size

4.85 kB

Total Files

3

Last publish

Collaborators

  • motork-user