Bug 91434

Summary: "box-sizing" partly ignored inside flexbox
Product: WebKit Reporter: pimvdb
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: ahmad.saleem792, jonlee
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Test case none

pimvdb
Reported 2012-07-16 15:30:13 PDT
Created attachment 152625 [details] Test case Scenario Two flexbox containers (`display: -webkit-flex`), each having a child element with a fixed square size and border defined. The one container has `-webkit-flex-direction: row` whereas the other has `-webkit-flex-direction: column`. There is a universal `box-sizing: border-box` rule. Problem The children are not square: `border-box` is only applied with respect to the cross axis, but is ignored with respect to the main axis. The children have their border added to their defined size with respect to the main axis, whereas the border is part of the defined size with respect to the cross axis. The children have sizes of 70x50 and 50x70, respectively, due to two 10px borders only added in the main axis direction. Setting `-webkit-flex-basis` doesn't help, although MDN states that it should honour box-sizing: https://developer.mozilla.org/en/CSS/flex-basis "flex-basis determines the size of the content-box unless specified otherwise using box-sizing." I've attached a test case.
Attachments
Test case (809 bytes, text/html)
2012-07-16 15:30 PDT, pimvdb
no flags
Jon Lee
Comment 1 2016-12-15 14:35:49 PST
The test case appears fixed.
Ahmad Saleem
Comment 2 2022-10-27 13:35:38 PDT
I am unable to reproduce this bug using attached test case and also updated test case without -webkit- prefixes as below: Link - https://jsfiddle.net/m09thrns/show All browsers (Safari 16.1, Chrome Canary 109 and Firefox Nightly 108) match each other. Marking this as "RESOLVED CONFIGURATION CHANGED". Please reopen, if it is not fixed with updated test case. Thanks!
Note You need to log in before you can comment on or make changes to this bug.