Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
JavaScript dynamic stylesheets
JavaScript
branch: master

This branch is 9 commits ahead, 2 commits behind radmen:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
.gitignore
.travis.yml
README.md
component.json
index.js
package.json

README.md

Build Status

css

JavaScript dynamic stylesheets

Installation

$ component install microjs/css

Usage

Basic usage.

var css = require('css');

var sheet = css.newSheet();
sheet
  .selector('div.test', {
    'float': 'left',
    'border': '1px solid #000'
  })
  .selector('span', {
    'font-style': 'italic'
  });

Selectors can be used later.

var div_css = sheet.selector('div.test');

div_css.properties({
  'background': 'pink'
});

Remove selector properties.

sheet.remove('div.test');
sheet.remove(div_css);

Remove sheet.

sheet.remove();

License

MIT

Something went wrong with that request. Please try again.