Package Exports
- postcss-short-color
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (postcss-short-color) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Shorthand Color 

Shorthand Color is a PostCSS plugin that extends the color
property so that background-color
may be set by the second value.
/* before */
header {
color: #abccfc #212231;
}
/* after */
header {
color: #abccfc;
background-color: #212231;
}
Usage
Follow these steps to use Shorthand Color.
Add Shorthand Color to your build tool:
npm install postcss-short-color --save-dev
Node
require('postcss-short-color')({ /* options */ }).process(YOUR_CSS);
PostCSS
Add PostCSS to your build tool:
npm install postcss --save-dev
Load Shorthand Color as a PostCSS plugin:
postcss([
require('postcss-short-color')({ /* options */ })
]);
Gulp
Add Gulp PostCSS to your build tool:
npm install gulp-postcss --save-dev
Enable Shorthand Color within your Gulpfile:
var postcss = require('gulp-postcss');
gulp.task('css', function () {
return gulp.src('./css/src/*.css').pipe(
postcss([
require('postcss-short-color')({ /* options */ })
])
).pipe(
gulp.dest('./css')
);
});
Grunt
Add Grunt PostCSS to your build tool:
npm install grunt-postcss --save-dev
Enable Shorthand Color within your Gruntfile:
grunt.loadNpmTasks('grunt-postcss');
grunt.initConfig({
postcss: {
options: {
processors: [
require('postcss-short-color')({ /* options */ })
]
},
dist: {
src: 'css/*.css'
}
}
});
Options
prefix
Type: String
Default: null
Specifies a prefix to be surrounded by dashes before the declaration (e.g. -x-color
).