JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
stylus: more vendor upgrades, cleanup
authorJason Woofenden <jason@jasonwoof.com>
Wed, 15 Oct 2014 22:54:51 +0000 (18:54 -0400)
committerJason Woofenden <jason@jasonwoof.com>
Wed, 15 Oct 2014 22:54:51 +0000 (18:54 -0400)
stylus-helpers.styl

index 06ecac7..15bebc4 100644 (file)
 _px(i)
        unit(i) == '' ? unit(i, px) : i
 
-
-vendors = webkit moz o ms official
-
+// transparently support vender-specific tags
 border-radius()
-       for vendor in vendors
-               if vendor == official
-                       border-radius: arguments
-               else
-                       -{vendor}-border-radius: arguments
-// FIXME add box shadow and text shadow?
+       -webkit-border-radius: arguments
+       border-radius: arguments
+box-shadow()
+       -webkit-box-shadow: arguments
+       box-shadow: arguments
+box-sizing()
+       -webkit-box-sizing: arguments
+       -moz-box-sizing: arguments
+       box-sizing: arguments
+
+// map "whitespace:" to "white-space:"
+whitespace()
+       white-space: arguments
 
 // helper function
 _pos(type, args)
@@ -31,7 +36,7 @@ _pos(type, args)
 // you can pass directions and units, or just directions. Examples:
 //     absolute: top 20px left 0
 //     fixed: top right
-//     relative: top: -4px
+//     relative: top -4px
 absolute()
        _pos('absolute', arguments)
 fixed()