ember-dynamic-stylesheet
v0.0.2
Published
Dynamically alter an Ember.js stylesheet.
Downloads
3
Readme
ember-dynamic-stylesheet
Dynamically alter an Ember.js stylesheet. Let's you:
- Add and remove classes
- Manage dynamic keyframes
Installation
ember install ember-dynamic-stylesheet
Usage
First, inject ember-dynamic-stylesheet
:
export default Ember.Component.extend({
dynamicStylesheet: Ember.inject.service()
});
Then use insertRule
to insert rules:
this.get('dynamicStylesheet').insertRule('.foo { color: red; }');
And deleteRule
to delete them:
this.get('dynamicStylesheet').deleteRule('.foo { color: red; }');