JSPM

swatcher

0.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q19028F
  • License MIT

CSS color variables

Package Exports

  • swatcher

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

Readme

swatcher

Make CSS variables via JavaScript

npm install swatcher --save

Usage

var swatcher = require('swatcher')

swatcher().assign({
  orange: '#f60',
  black: '#000'
}).css()

Methods

  • .assign(swatches): set swatch values
  • .lookup(name): get swatch value
  • .object(): get JavaScript object
  • .json(): get json string
  • .css(): get css string
  • .scss(): get scss string
  • .less(): get less string