PEM-- / cssc

Stylesheets in CoffeeScript
10 stars 0 forks source link

Description

This Meteor package provides an easy way to create your stylesheets in CoffeeScript: CSSC

Find some additional information on my blog:

Installation

meteor add pierreeric:cssc

Usages and API

Basic usage

The following example creates a new stylesheet with 3 rules: one on the HTML file and a second on a CSS class .bubble and a third for multiple CSSRules:

mainCss = new CSSC

mainCss
  .add 'html',
    backgroundColor: 'red'
  .add '.bubble',
    backgroundColor: '#FFDC00'
    borderRadius: CSSC.em 0.75
  .add ['h1', 'h2'],
    backgroundColor: 'blue'

CSS properties are declared as a dictionary of keys and values respecting the DOM and CCOM API when called in Javascript.

Helper functions

They allow working with numerical value instead of strings.

Plugins

You can add additional plugins to this package enhancing its capabilities.

Available options are:

Dependencies

Acknowledgments