Skip to content

Commit

Permalink
Preserve importance for display, fixes #72
Browse files Browse the repository at this point in the history
  • Loading branch information
kizu committed Aug 24, 2012
1 parent c533707 commit 699be18
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 14 deletions.
24 changes: 12 additions & 12 deletions lib/nib/flex.styl
Expand Up @@ -2,12 +2,12 @@
* Vendor "display: flex" support with fallback to obsolete versions.
*/

display(type)
display(type, args...)
if flex == type || inline-flex == type
display: vendor-value(box, only: moz ms webkit)
display: vendor-value(type, only: webkit official) // overwrites old webkit
display: vendor-value(box args, only: moz ms webkit)
display: vendor-value(arguments, only: webkit official) // overwrites old webkit
else
display: type
display: arguments

/*
* New syntax for browsers like Google Chrome.
Expand Down Expand Up @@ -39,14 +39,14 @@ align-items(align)
else if flex-end == align
align = end
vendor('box-align', align, ignore: official)
// new

// new
vendor('align-items', arguments, only: webkit official)

flex(growth)
// obsolete
vendor('box-flex', growth)

// new
vendor('flex', arguments, only: webkit official)

Expand All @@ -58,28 +58,28 @@ flex-direction(direction)
vendor('box-orient', horizontal, ignore: official)
else if column == direction || column-reverse == direction
vendor('box-orient', vertical, ignore: official)

// new
vendor('flex-direction', arguments, only: webkit official)

flex-flow(direction)
// obsolete
if row-reverse == direction || column-reverse == direction || wrap-reverse == direction
vendor('box-direction', 'reverse', ignore: official)

// new
vendor('flex-flow', arguments, only: webkit official)

flex-grow(growth)
// obsolete
vendor('box-flex', growth)

// new
vendor('flex-grow', arguments, only: webkit official)

order()
// obsolete
vendor('box-ordinal-group', arguments, ignore: official)

// new
vendor('order', arguments, only: webkit official)
vendor('order', arguments, only: webkit official)
8 changes: 8 additions & 0 deletions test/cases/flex.css
Expand Up @@ -24,3 +24,11 @@ section div {
-webkit-flex: 1 0;
flex: 1 0;
}
section {
display: -webkit-box !important;
display: -moz-box !important;
display: -ms-box !important;
display: -webkit-flex !important;
display: box !important;
display: flex !important;
}
7 changes: 5 additions & 2 deletions test/cases/flex.styl
Expand Up @@ -5,6 +5,9 @@
section
display: flex
flex-direction: row

div
flex: 1 0
flex: 1 0

section
display: flex !important

0 comments on commit 699be18

Please sign in to comment.