Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Improve CSS library (add text_shadow, box_shadow, reset_padding, ...)

  • Loading branch information...
commit e9bf0af9eb4ec996b2d263f4f410ab038f1ae556 1 parent 40eb336
Thomas Gazagnaire authored November 13, 2010

Showing 2 changed files with 52 additions and 12 deletions. Show diff stats Hide diff stats

  1. 54  css.ml
  2. 10  css.mli
54  css.ml
@@ -84,29 +84,61 @@ let gradient ~low ~high =
84 84
     background: -moz-linear-gradient(top,  $high$,  $low$); /* for firefox 3.6+ */
85 85
  >>
86 86
 
87  
-let rounded : t =
  87
+let text_shadow =
  88
+  <:css<
  89
+    text-shadow: 0 1px 1px rgba(0,0,0,.3);  
  90
+  >>
  91
+
  92
+let box_shadow =
88 93
   <:css<
89  
-    text-shadow: 0 1px 1px rgba(0,0,0,.3);
90  
-    -webkit-border-radius: .5em;
91  
-    -moz-border-radius: .5em;
92  
-    border-radius: .5em;
93 94
     -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.2);
94 95
     -moz-box-shadow: 0 1px 2px rgba(0,0,0,.2);
95 96
     box-shadow: 0 1px 2px rgba(0,0,0,.2);
96 97
   >>
97 98
 
98  
-let top_rounded : t =
  99
+let rounded =
  100
+  <:css<
  101
+    -webkit-border-radius: .5em;
  102
+    -moz-border-radius: .5em;
  103
+    border-radius: .5em;
  104
+  >>
  105
+
  106
+let top_rounded =
99 107
   <:css<
100  
-    text-shadow: 0 1px 1px rgba(0,0,0,.3);
101 108
     -webkit-border-top-left-radius: .5em;
102 109
     -webkit-border-top-right-radius: .5em;
103 110
     -moz-border-radius-topleft: .5em;
104 111
     -moz-border-radius-topright: .5em;
105 112
     border-top-left-radius: .5em;
106 113
     border-top-right-radius: .5em;
107  
-    -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.2);
108  
-    -moz-box-shadow: 0 1px 2px rgba(0,0,0,.2);
109  
-    box-shadow: 0 1px 2px rgba(0,0,0,.2);
110 114
   >>
111  
-                                                               
  115
+
  116
+let bottom_rounded =
  117
+  <:css<
  118
+    -webkit-border-bottom-left-radius: .5em;
  119
+    -webkit-border-bottom-right-radius: .5em;
  120
+    -moz-border-radius-bottomleft: .5em;
  121
+    -moz-border-radius-bottomright: .5em;
  122
+    border-bottom-left-radius: .5em;
  123
+    border-bottom-right-radius: .5em;
  124
+  >>
  125
+
  126
+let no_padding =
  127
+  <:css<
  128
+    margin: 0;
  129
+    padding: 0;
  130
+  >>
  131
+
  132
+let reset_padding =
  133
+  <:css<
  134
+    html, body, div,
  135
+    h1, h2, h3, h4, h5, h6,
  136
+    ul, ol, dl, li, dt, dd, p,
  137
+    blockquote, pre, form, fieldset,
  138
+    table, th, td { 
  139
+      margin: 0; 
  140
+      padding: 0; 
  141
+   }
  142
+  >>
  143
+
112 144
 include Css
10  css.mli
@@ -33,8 +33,16 @@ end
33 33
 
34 34
 val to_string : t -> string
35 35
 
  36
+(** {2 CSS library} *)
  37
+
36 38
 val gradient : low:t -> high:t -> t
37 39
 
  40
+val top_rounded : t
  41
+val bottom_rounded : t
38 42
 val rounded: t
39 43
 
40  
-val top_rounded : t
  44
+val box_shadow : t
  45
+val text_shadow : t
  46
+
  47
+val no_padding : t
  48
+val reset_padding : t

0 notes on commit e9bf0af

Please sign in to comment.
Something went wrong with that request. Please try again.