https://github.com/gravityblast/style-rule
Made in CoffeeScript, it adds the ability to manage css style rules from javascript.
https://github.com/gravityblast/style-rule
Last synced: 13 days ago
JSON representation
Made in CoffeeScript, it adds the ability to manage css style rules from javascript.
- Host: GitHub
- URL: https://github.com/gravityblast/style-rule
- Owner: gravityblast
- License: mit
- Created: 2012-03-22T11:47:57.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2012-03-22T17:41:54.000Z (over 13 years ago)
- Last Synced: 2025-05-18T16:09:53.081Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 89.8 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#StyleRule
Cross-browser css style rules management from javascript.
##Example
var styleRule = new StyleRule();
var index_red = styleRule.add("body", "background: red;");
var index_yellow = styleRule.add("body", "background: yellow;");
var index_blue = styleRule.add("body", "background: blue;");
var index_brown = styleRule.add("body", "background: brown;");
styleRule.replace(index_blue, "body", "background: violet;");
styleRule.remove(index_yellow);