Permalink
Browse files

update readme

  • Loading branch information...
aeosynth committed Feb 4, 2011
1 parent dc99754 commit 940c6cc1485befcbd047b52b207bfdc48c7c8c5e
Showing with 28 additions and 0 deletions.
  1. +28 −0 readme.md
View
@@ -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;
+ }

0 comments on commit 940c6cc

Please sign in to comment.