W3C home > Mailing lists > Public > www-style@w3.org > March 2013

Re: [cssom] Interaction of getComputedStyle.width/height and box-sizing

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Fri, 29 Mar 2013 13:18:29 -0400
Message-ID: <5155CCE5.2010608@mit.edu>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: www-style list <www-style@w3.org>
On 3/29/13 1:03 PM, Tab Atkins Jr. wrote:
> Oh, no, not at all.  You still want to return the used value *of the
> 'width' property*.  'box-sizing' changes how the 'width' property is
> interpreted when figuring out the width of the content box, but it
> doesn't actually change the value of the 'width' property itself.

Uh... it can't possibly work that way, because the used width 
participates in this equation in CSS2.1 section 10.3.3:

     'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 
'padding-right' + 'border-right-width' + 'margin-right' = width of 
containing block

or in this one in CSS3 Box draft section 15.3 if you prefer:

   start margin + start border + start padding + inline dimension + end 
padding + end border + end margin = inline dimension of containing block

So the used "inline dimension" or "width", depending on which of those 
specs you read, is 100% definitely affected by box-sizing.

Received on Friday, 29 March 2013 17:18:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:27 UTC