diff --git a/lib/nib/index.styl b/lib/nib/index.styl index 411e5067..40355fe2 100644 --- a/lib/nib/index.styl +++ b/lib/nib/index.styl @@ -10,3 +10,4 @@ @import 'reset' @import 'text' @import 'vendor' +@import 'size' diff --git a/lib/nib/size.styl b/lib/nib/size.styl new file mode 100644 index 00000000..fd3aaf62 --- /dev/null +++ b/lib/nib/size.styl @@ -0,0 +1,28 @@ +/* + * Size utility. + * + * Synopsis: + * + * size: | + * + * Examples: + * + * size: 100% 30px + * yields: + * width: 100% + * height: 30px + * + * size: 5px + * yields: + * width: 5px + * height: 5px + * + */ + +size() + if length(arguments) == 1 + width: arguments[0] + height: arguments[0] + else + width: arguments[0] + height: arguments[1]