Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Missing examples for hsv and hsva. Added documentation for unit funct…

…ion.
  • Loading branch information...
commit 325db6d2c954fac2f01bce5134f11b2c88b9561f 1 parent ceb57cc
@lukeapage lukeapage authored
Showing with 31 additions and 0 deletions.
  1. +31 −0 templates/pages/reference.md
View
31 templates/pages/reference.md
@@ -2,6 +2,8 @@
escape(@string); // URL encodes a string
+ unit(@dimension, [@unit: ""]); // remove or change the unit of a dimension
+
ceil(@number); // rounds up to an integer
floor(@number); // rounds down to an integer
percentage(@number); // converts to a %, e.g. 0.5 -> 50%
@@ -66,6 +68,31 @@ Example:
Output:
a%3D1
+#Misc functions
+###unit
+Remove or change the unit of a dimension
+
+Parameters:
+
+* `dimension`: A number, with or without a dimension
+* `unit`: Optional: the unit to change to, or if omitted it will remove the unit
+
+Example:
+
+ unit(5, px)
+
+Output:
+
+ 5px
+
+Example:
+
+ unit(5em)
+
+Output:
+
+ 5
+
#Math functions
###ceil
Rounds up to the next highest integer.
@@ -256,6 +283,8 @@ Example:
Output:
+ #408000
+
###hsva
Creates a transparent color object from hue, saturation, value and alpha (HSVA) values. Note that this is not the same as `hsla`.
@@ -274,6 +303,8 @@ Example:
Output:
+ rgba(64, 128, 0, 0.5)
+
##Color channel information
###hue
Extracts the hue channel of a color object.

0 comments on commit 325db6d

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