Skip to content

microjs/css

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

JavaScript dynamic stylesheets

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%