JSPM

postcss-palette

0.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q29088F
  • License MIT

PostCSS plugin for colors management using external palettes

Package Exports

  • postcss-palette

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-palette) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

PostCSS Palette Build Status

PostCSS plugin for colors management using external palettes.

Example

/* palette.js */

module.exports = {
    red: '#fa1200',
    green: '#1f0',
    blue: 'rgb(0, 42, 240)'
}
var palette = require('postcss-palette');

postcss([ palette({ palette: require('/path/to/palette') }) ]);
.foo {
    background-color: red;
    color: green;
    text-shadow: 0 0 5px blue;
    box-shadow: 0 0 5px blue;
    border-color: green;
}
.foo {
    background-color: #fa1200;
    color: #1f0;
    text-shadow: 0 0 5px rgb(0, 42, 240);
    box-shadow: 0 0 5px rgb(0, 42, 240);
    border-color: #1f0;
}

Usage

postcss([ require('postcss-palette') ])

See PostCSS docs for examples for your environment.