npm.io
1.0.0 • Published 8 years ago

biscotti-css

Licence
MIT
Version
1.0.0
Deps
2
Size
7 kB
Vulns
0
Weekly
0

Biscotti CSS

CoffeeScript virtual CSS templates.

# add a helper
rhythm = (lineHeight, fontSize) -> [
  p "font-size", scale lineHeight, fontSize
  p "line-height", lineHeight
]

$ s "article", [

  # nested styles using &
  s "& > h1", [

    # built-in unit helpers
    rhythm (rem 4), (pct 90)
  ]

  s "& > p", [
    p "font-face", "Montserrat"
  ]
]

Install

npm i -s biscotti-css

Usage

import processor from "biscotti-css"
render = do processor
render path: "./vcss/index.vcss"