Skip to content

Commit

Permalink
Fix order for non-digit values
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Mar 11, 2017
1 parent 2ea3946 commit b12960c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/hacks/order.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Order extends Declaration
# Fix value for 2009 spec
set: (decl, prefix) ->
spec = flexSpec(prefix)[0]
if spec == 2009
if spec == 2009 and /\d/.test(decl.value)
decl.value = (parseInt(decl.value) + 1).toString()
super(decl, prefix)
else
Expand Down
3 changes: 3 additions & 0 deletions test/cases/flexbox.css
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,6 @@ a {
.i {
flex-flow: nowrap;
}
.inherit {
order: inherit;
}
7 changes: 7 additions & 0 deletions test/cases/flexbox.out.css
Original file line number Diff line number Diff line change
Expand Up @@ -233,3 +233,10 @@ a {
-ms-flex-flow: nowrap;
flex-flow: nowrap;
}
.inherit {
-webkit-box-ordinal-group: inherit;
-webkit-order: inherit;
-moz-box-ordinal-group: inherit;
-ms-flex-order: inherit;
order: inherit;
}

0 comments on commit b12960c

Please sign in to comment.