var css = require('greens')(),
bodyRule = css.add('body',{
backgroundColor: 'black',
fontSize: 'big'
}),
rotation = css.add('@keyframes rotation',{
from: {
transform: 'rotate(0deg)'
},
to: {
transform: 'rotate(360deg)'
}
}),
rot50;
bodyRule.fontSize = 'small'; // Dynamically change the rules
css.remove(bodyRule); // Remove rule
rot50 = rotation.add('50%',{
transform: 'rotate(90deg)' // Dynamically add a rule to an @rule
});
rotation.remove(rot50); // Remove the rule
-
Notifications
You must be signed in to change notification settings - Fork 0
Dynamic css helpers
License
manvalls/greens
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|