diff --git a/lib/nib/flex.styl b/lib/nib/flex.styl index 0b72fd2e..b8e5121c 100644 --- a/lib/nib/flex.styl +++ b/lib/nib/flex.styl @@ -20,9 +20,6 @@ align-content() align-self() vendor('align-self', arguments, only: webkit official) -flex-basis() - vendor('flex-basis', arguments, only: webkit official) - flex-shrink() vendor('flex-shrink', arguments, only: webkit official) @@ -43,21 +40,47 @@ align-items(align) // new vendor('align-items', arguments, only: webkit official) -flex(growth) +flex(growth, shrink = null, basis = null) // obsolete - vendor('box-flex', growth) + if growth == "none" // flex: none + vendor('box-flex', 0) + width: auto + height: auto + else if basis != null // flex: <'flex-grow'> <'flex-shrink'> <'flex-basis'> + vendor('box-flex', growth) + width: basis + height: basis + else if shrink != null // flex: <'flex-grow'> <'flex-shrink'> || <'flex-grow'> <'flex-basis'> + vendor('box-flex', growth) + if unit(shrink) != "" // flex: <'flex-grow'> <'flex-basis'> + width: basis + height: basis + else // flex: <'flew-grow'> + vendor('box-flex', growth) // new vendor('flex', arguments, only: webkit official) +flex-basis(basis) + // obsolete + width: basis + height: basis + + // new + vendor('flex-basis', arguments, only: webkit official) + flex-direction(direction) // obsolete if row-reverse == direction || column-reverse == direction vendor('box-direction', reverse, ignore: official) if row == direction || row-reverse == direction vendor('box-orient', horizontal, ignore: official) + >* + height: auto !important else if column == direction || column-reverse == direction vendor('box-orient', vertical, ignore: official) + >* + width: auto !important // new vendor('flex-direction', arguments, only: webkit official)