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

Re: box-sizing + intrinsic dimensions

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 07 Aug 2012 17:12:35 -0400
Message-ID: <502184C3.8010209@mit.edu>
To: Ojan Vafai <ojan@chromium.org>
CC: www-style@w3.org
On 8/7/12 3:39 PM, Ojan Vafai wrote:
> How should box-sizing affect things that are sized based off intrinsic
> dimensions?

For what it's worth, in Gecko -moz-available (which is the 
fill-available value) subtracts off the elements own border and padding 
in content-box sizing but not in border-box sizing, so that the actual 
content width is whatever is actually available.  This seems like it has 
significantly better ergonomics than the alternative.

Similar for min-content and max-content, actually: I believe they always 
set the content width, not the overall width.

> I suppose you're just getting what you ask for here?

A fundamental problem with that is that it's impossible to ask for 
different box sizing in different dimensions.  If a page could do 
content-box sizing horizontally while doing border-box vertically, it 
would be a lot more reasonable to say "don't do that" when using 
border-box horizontally with intrinsic widths.

> I'm not sure it's worth adding magic to fix these cases.

In case it matters, it doesn't take much magic: you just have to have 
the computations for the intrinsic widths add in the padding and/or 
border as needed, and then everything else works like it normally would.

-Boris
Received on Tuesday, 7 August 2012 21:13:09 GMT

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