Skip to content

Commit

Permalink
Fixed wrong unit for flex-basis
Browse files Browse the repository at this point in the history
  • Loading branch information
ThisIsManta committed May 18, 2020
1 parent b9b9847 commit 23ee3bd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion edge/format.js
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ function format(content, options = {}) {
outputBuffer.append(inputNode.val)
}

if (checkIfFlexBasis(inputNode)) {
if (checkIfFlexBasis(inputNode) && inputNode.val === 0) {
// See https://github.com/philipwalton/flexbugs#flexbug-4
outputBuffer.append('%')

Expand Down
4 changes: 3 additions & 1 deletion spec/option-always-use-zero-without-unit-true/input.styl
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ body
transition all 0ms ease-in-out 0s
// See https://github.com/philipwalton/flexbugs#flexbug-4
flex 1 1 0px
flex-basis 0px
flex 0 0 480px
flex-basis 0px
flex-basis 480px
2 changes: 2 additions & 0 deletions spec/option-always-use-zero-without-unit-true/output.styl
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ body {
transition: all 0ms ease-in-out 0s;
// See https://github.com/philipwalton/flexbugs#flexbug-4
flex: 1 1 0%;
flex: 0 0 480px;
flex-basis: 0%;
flex-basis: 480px;
}

0 comments on commit 23ee3bd

Please sign in to comment.