Skip to content

radmen/css.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

css.js

JavaScript dynamic stylesheets

usage

Basic usage.

var sheet = cssjs.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();

Copyright and Licensing

Copyright (c) 2012 Radosław Mejer, released under the MIT license.

todo

  • compatibility check
  • unit testing
  • ...?

About

JavaScript dynamic stylesheets

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published