Browse files

Update NEWS and README

  • Loading branch information...
1 parent 26f207b commit acb401785bb36af455c54ccad25d7a5717dcc78c @samoht committed Nov 23, 2010
Showing with 48 additions and 3 deletions.
  1. +7 −0 NEWS
  2. +0 −3 README
  3. +41 −0 README.md
View
7 NEWS
@@ -0,0 +1,7 @@
+0.1.0:
+* support for nested declarations [22 Nov 2010]
+* use ocamlbuild [22 Nov 2010]
+* CSS API (text_shadow, box_shadow, reset_padding) [13 Nov 2010]
+* CSS API (top_rounded, bottom_rounded) [11 Nov 2010]
+* CSS API (rounded) [10 Nov 2010]
+* initial commit [3 Oct 2010]
View
3 README
@@ -1,3 +0,0 @@
-A simple CSS quotation mechanism for ocaml using camlp4.
-
-Project based on the very good CUFP tutorial by Jake Donham and Nicolas Pouillard (http://cufp.org/conference/sessions/2010/camlp4-and-template-haskell)
View
41 README.md
@@ -0,0 +1,41 @@
+A CSS quotation mechanism for ocaml using camlp4.
+
+This library started as a toy-project at very good
+[CUFP tutorial](http://cufp.org/conference/sessions/2010/camlp4-and-template-haskell)
+by
+by [Jake Donham](http://www.github.com/jaked) and [Nicolas Pouillard](http://www.github.com/np).
+It is now in a working state for bigger projects.
+
+== Examples ==
+
+Define two global CSS colors:
+
+ let color1 = <:css< black >>
+ let color2 = <:css< gray >>
+
+Define the style for a button; we can a specific API to generate cross-platform complex styles.
+
+ let button = <:css<
+ .button {
+ $Css.gradient ~low:color2 ~high:color1$;
+ color: white;
+ $Css.top_rounded$;
+ >>
+
+We can the use nested declarations to build modular styles :
+
+ let container button_style header_style = <:css<
+ .container {
+ $button_style$;
+ $header_style$;
+ background-color: green;
+ }
+
+ let mystyle = container button <:css< h1 { font-weight: bold; } >>
+
+== Remarks ==
+
+The parser is far for being perfect. For example, to write properties do not forget to add a space
+character after the colon (ie. `foo: bar`, not `foo:bar`)
+
+

0 comments on commit acb4017

Please sign in to comment.