Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
An immutable object model for CSS
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
transforms
.gitignore
.jshintrc
LICENSE
Makefile
README.md
container.js
index.js
nested-container.js
package.json

README.md

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();
Something went wrong with that request. Please try again.