1.0.6 • Published 9 years ago

vz.css v1.0.6

Weekly downloads
3
License
LGPL-3.0
Repository
github
Last release
9 years ago

vz css

DEPRECATED in favour of u-css

Note: This package is supposed to be used in a browser context using a tool like browserify

Sample usage:

var css = require('vz.css'),
    bodyRule = css.add('body',{
      backgroundColor: 'black',
      fontSize: 'big'
    }),
    rotation = css.add('@keyframes rotation',{
      from: {
        transform: 'rotate(0deg)'
      },
      to: {
        transform: 'rotate(360deg)'
      }
    }),
    rot50;

bodyRule.set({
  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

Reference

CssGroup object

CssGroup.add(selector,properties)

CssGroup.addTxt(css text)

Adds a css rule to the group. If the added rule is also a group of rules, eg an @supports rule, a new CssGroup is returned, in other case a Capsule with the css declaration as internal object will be returned.

CssGroup.remove(rule)

Removes rules from the group. rule is the object returned from CssGroup.add, once it has been removed from the CssGroup there's no way to add it back, a new rule must be created.

1.0.6

9 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago