xcss-object-model

Object model for xCSS

npm install xcss-object-model
1 downloads in the last day
15 downloads in the last week
18 downloads in the last month

xcss-object-model

An immutable object model for CSS. A part of xCSS.

Installation

Install via npm:

% npm install xcss-object-model

Usage

Compose a stylesheet and call .toCSS() method to get CSS:

var xcss = require('xcss-object-model');

var stylesheet = xcss.stylesheet;
var rule = xcss.rule;

var style = stylesheet(null,
  rule('body', {
    backgroundColor: 'red'
  }),

  rule('div', {
    width: '12px'
  })
)

var css = style.toCSS();
npm loves you