W3C home > Mailing lists > Public > www-style@w3.org > February 2012

flexbox and box-sizing

From: Philip Walton <philip@philipwalton.com>
Date: Thu, 23 Feb 2012 08:18:03 -0800
Message-Id: <57440D3E-FD1B-4526-91AD-0898C6AAB3AA@philipwalton.com>
To: www-style@w3.org
Disclaimer: This is my first post to this list, so feel free to tell me if this email should be sent somewhere else.

I've been playing around with the new flexbox in Chrome and Webkit nightlies, and it seems that the webkit implementation ignores box-sizing: border-box. Before filing a bug or anything, I wanted to make sure my opinion of what should happen is actually the same as the intention of the spec.

Imagine the following setup:
- you have a flexbox with two child flexbox-items
- each flexbox-item has a width of 50%
- each flexbox-item has padding: 1em
- each flexbox-item has box-sizing: border-box

After reading the spec and specifically the "Flexbox Layout Algorithm", It seems to me that flexbox-items should handle widths and box-sizing the way normal elements do, but that doesn't appear to be the case.

Is this a bug in Webkit's implementation or is there somewhere that the spec address this that I've missed?

Here's a jsfiddle example illustrating the issue:
http://jsfiddle.net/Qx3nW/1/

Philip
Received on Thursday, 23 February 2012 16:18:38 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:51 GMT