You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a little issue with truncating the flex-basis value in the shorthand notation.
In Chrome and Firefox flex: 1 1 0 computes into flex-basis: 0px, whether flex: 1 1 to flex-basis: 0%.
It is not that much of trouble until you try to modify the content of the element dynamically which will lead to the difference for that two values.
The difference is that the percentage values rely on the size of the parent being set, and they fall back to their content otherwise. That doesn't happen with the pixels. https://www.w3.org/TR/css-flexbox-1/#flex-basis-property
Probably it is better to go for the full flex notation in the resulted code (use all three flex-grow, flex-shrink and flex-basis properties). That can eliminate the ambiguity in the flex-basis value. Does that approach has its hidden pitfalls?
The text was updated successfully, but these errors were encountered:
There is a little issue with truncating the flex-basis value in the shorthand notation.
In Chrome and Firefox
flex: 1 1 0
computes intoflex-basis: 0px
, whetherflex: 1 1
toflex-basis: 0%
.It is not that much of trouble until you try to modify the content of the element dynamically which will lead to the difference for that two values.
The difference is that the percentage values rely on the size of the parent being set, and they fall back to their content otherwise. That doesn't happen with the pixels.
https://www.w3.org/TR/css-flexbox-1/#flex-basis-property
Probably it is better to go for the full flex notation in the resulted code (use all three
flex-grow
,flex-shrink
andflex-basis
properties). That can eliminate the ambiguity in the flex-basis value. Does that approach has its hidden pitfalls?The text was updated successfully, but these errors were encountered: