postcss-property-shorthand

PostCSS plugin for short definition of user default properties using variables


Keywords
postcss, css, postcss-plugin, variables, shorthand
License
MIT
Install
npm install postcss-property-shorthand@1.0.0

Documentation

PostCSS Property Shorthand Build Status

PostCSS plugin for short definition of user default properties using variables.

.foo {
    transition: ;
}
.foo {
    transition: $transition;
}

Usage

postcss([ require('postcss-property-shorthand') ])

See PostCSS docs for examples for your environment.

Options

syntax

Type: css, scss, less
Default: ``
Manage type of variables

Using stylus (default) variable

postcss([
    require('postcss-property-shorthand')
])
/* input */
.foo {
    transition: ;
}
/* output */
.foo {
    transition: transition;
}

Using scss variable

postcss([
    require('postcss-property-shorthand')({
        syntax: 'scss'
    })
])
/* input */
.foo {
    transition: ;
}
/* output */
.foo {
    transition: $transition;
}

Using css custom property

postcss([
    require('postcss-property-shorthand')({
        syntax: 'css'
    })
])
/* input */
.foo {
    transition: ;
}
/* output */
.foo {
    transition: var(--transition);
}