Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 958 Bytes

README.md

File metadata and controls

39 lines (29 loc) · 958 Bytes

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