diff --git a/readme.md b/readme.md index f8e737b..86ab7fb 100644 --- a/readme.md +++ b/readme.md @@ -32,3 +32,31 @@ append the key to the current selector, and recurse; else generate css. if you want inline logic, wrap it up in a function which returns an object. keys that would confuse the real compiler, coffee-script, must be quoted. + +to reduce the amount of quoting, if a css property has a capital letter C, +it will be transformed into -c; selectors are not touched. + +eg, instead of + + borderRadius = (arg) -> + '-webkit-border-radius': arg + '-moz-border-radius': arg + 'border-radius': arg + +we can write + + borderRadius = (arg) -> + WebkitBorderRadius: arg + MozBorderRadius: arg + borderRadius: arg + + '#id .className': + borderRadius 5 + +compiled: + + #id .className { + -webkit-border-radius: 5; + -moz-border-radius: 5; + border-radius: 5; + }