Permalink
Browse files

added back `is-width`

flexbox relies on it
  • Loading branch information...
1 parent 4f74ecc commit 8787f56681c1c7407444ea0f2b273428c78e787b @slang800 slang800 committed Jul 31, 2013
Showing with 15 additions and 3 deletions.
  1. +15 −3 lib/nib/vendor.styl
View
18 lib/nib/vendor.styl
@@ -8,9 +8,21 @@ use('../nodes/vendor-helpers.js')
no-wrap = unquote('nowrap')
/*
- * Vendor support for the given prop / arguments,
- * optionally specifying the only prefixes to utilize,
- * or those which should be ignored.
+ * Helper to find out if a given value is a width
+ */
+
+is-width(val)
+ if auto == val
+ return true
+ else if val && 'unit' == type(val)
+ // Stylus does not short circuit so we need to perform this as a distinct
+ // operation to prevent errors
+ return '' != unit(val)
+ return false
+
+/*
+ * Vendor support for the given prop / arguments, optionally specifying the
+ * only prefixes to utilize, or those which should be ignored.
*/
vendor(prop, args, only = null, ignore = null, vendor-property = true)

0 comments on commit 8787f56

Please sign in to comment.