sheetify-variables
A sheetify transform to add support for W3C-style CSS variables syntax
Last updated 6 years ago by yoshuawuyts .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install sheetify-variables 
SYNC missed versions from official npm registry.

sheetify-variables

NPM version build status Test coverage Downloads

A sheetify transform to add support for W3C-style CSS variables syntax. Uses rework-vars to perform the transformation.

N.B. This is not a polyfill. This transform aims to provide a future-proof way of using a limited subset of the features provided by native CSS variables.

Installation

npm install sheetify-variables

Usage

As a sheetify transform:

var variables = require('sheetify-variables');
var sheetify = require('sheetify');

sheetify('path/to/my/index.css')
  .transform(variables({preserve: true}))
  .bundle();

Options

map

Optionally, you may pass an object of variables to the JavaScript function.

var myVars = {
  'app-bg-color': 'white'
};

variables({map: myVars});

preserve

Setting preserve to true will preserve the variable definitions and references in the output, so that they can be used by supporting browsers.

variables({preserve: true});

License

MIT

Current Tags

  • 1.0.4                                ...           latest (6 years ago)

5 Versions

  • 1.0.4                                ...           6 years ago
  • 1.0.3                                ...           6 years ago
  • 1.0.2                                ...           6 years ago
  • 1.0.1                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (5)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |