postcss-remove-null
Remove null values with PostCSS.
Functionality
The basic use case of this plugin functions very similar to null
in Sass.
Given
The plugin will output
It's recommended that this plugin be followed by cssnano or postcss-discard-empty to ensure that the div
in the above example is removed.
This plugin also intelligently handles nulls present in shorthand declarations.
Given
The plugin will output
For more insight on what the plugin currently covers checkout the tests;
Installation
npm install --save-dev postcss-remove-null
Usage
var postcss = ;var removeNull = ;var cssNano = ;