xcss-object-model

0.5.1 • Public • Published

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();

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.5.1
    1
    • latest

Version History

Package Sidebar

Install

npm i xcss-object-model

Weekly Downloads

7

Version

0.5.1

License

MIT

Last publish

Collaborators

  • andreypopp