What is style-extract?
Style-extract is a Node.js script for extracting only specific CSS properties and their selectors from CSS code. We use it in our workflow to get
font-size and other CSS properties, which we want our users to change.
npm install style-extract
code: String of the CSS code.
- properties: an array of CSS properties, that will be extracted
var extract = ;var fs = ;var css = fs;var options =properties: 'color' 'background-color';var result = ;fs;
/* Foo *//* Bar */
The Grunt version can be found at grunt-style-extract.
The Gulp version can be found at gulp-style-extract.