Skip to content

manvalls/greens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Greens

Build Status Coverage Status

Sample usage

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

About

Dynamic css helpers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages