Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 10 hours 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 12 years ago)
- Default Branch: master
- Last Pushed: 2012-03-22T17:41:54.000Z (over 12 years ago)
- Last Synced: 2023-04-11T01:06:01.607Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 89.8 KB
- Stars: 2
- Watchers: 4
- 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);