-
Notifications
You must be signed in to change notification settings - Fork 731
Closed
Labels
Closed Accepted by CSSWG ResolutionCommenter SatisfiedCommenter has indicated satisfaction with the resolution / edits.Commenter has indicated satisfaction with the resolution / edits.Needs Testcase (WPT)Tracked in DoCcss-flexbox-1Current WorkCurrent Work
Milestone
Description
I noticed a problem while working with flexbox last week:
<div style="display: flex">
<div style="flex: 2"></div>
<div style="flex: 1"></div>
</div>
If we add padding or borders, the flex items are not actually distributed at thirds according to the algorithm, even if box-sizing is set to border-box. This is in direct contradiction to our examples/descriptions in https://www.w3.org/TR/css-flexbox-1/#flex-common
The way things are, it's not possible to get things to align unless you do some fancy math with the padding and borders... the avoidance of which is exactly the point of having the box-sizing property. I'm somewhat afraid it's not possible to fix this anymore. :( But for sure it's got to be annoying for authors...
Metadata
Metadata
Assignees
Labels
Closed Accepted by CSSWG ResolutionCommenter SatisfiedCommenter has indicated satisfaction with the resolution / edits.Commenter has indicated satisfaction with the resolution / edits.Needs Testcase (WPT)Tracked in DoCcss-flexbox-1Current WorkCurrent Work