Skip to content

Commit

Permalink
Merge pull request #173 from articobandurini/master
Browse files Browse the repository at this point in the history
Size utility
  • Loading branch information
tj committed Mar 16, 2013
2 parents 9c54252 + e76b772 commit e1b71cd
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/nib/index.styl
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
@import 'reset'
@import 'text'
@import 'vendor'
@import 'size'
28 changes: 28 additions & 0 deletions lib/nib/size.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Size utility.
*
* Synopsis:
*
* size: <width> <height> | <width & height>
*
* 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]

0 comments on commit e1b71cd

Please sign in to comment.