W3C home > Mailing lists > Public > www-style@w3.org > January 2008

Re: proposed change for scrollbars in size calculations

From: fantasai <fantasai.lists@inkedblade.net>
Date: Mon, 14 Jan 2008 15:32:01 -0500
Message-ID: <478BC6C1.9080100@inkedblade.net>
To: Alex Mogilevsky <alexmog@exchange.microsoft.com>
CC: "www-style@w3.org" <www-style@w3.org>, Rossen Atanassov <ratan@windows.microsoft.com>, Harel Williams <harelw@microsoft.com>

Alex Mogilevsky wrote:
> It appears there is an agreement for the main question of this thread:
> if width or height is specified on an element with overflow:scroll or
> overflow:auto, any scrollbars sizes don't affect dimensions of its
> border box but instead are subtracted from specified width/height.
> 
> There is a broad interop on these test cases: 
> http://lists.w3.org/Archives/Public/www-style/2008Jan/att-0089/scroll2.htm.
> 100% browsers use the model where no values of overflow (including
> 'scroll' and 'auto') affect dimensions of border box.
> 
> To make the spec match the implementations, I propose the following
> updates to section 10:
> 
> 10.3.3 and 10.3.7: Insert (immediately after the formula)
> If 'width' is not 'auto' and scrollbar width is not zero, subtract scrollbar width from 'width'.
> 10.6.4: Insert (immediately after the formula)
> If 'height' is not 'auto' and scrollbar height is not zero, subtract scrollbar height from
> 'height'.
 >
> ...Earlier text for 11.1.1 had this:
> 
> "Any space taken up by the scrollbars should be subtracted from the
> computed width/height, thus preserving the inner border edge."
> 
> That provided guidance that applied to all cases. Perhaps it should be
> restored, maybe with adjustments so that it doesn't contradict the
> definitions in section 10.

I don't think your proposed wording is very clear on what happens to the
computed width / used width/ containing block of children. How about this?

   1) Revert changes in Chapter 10 from Issue 150.
        http://lists.w3.org/Archives/Public/www-style/2008Jan/0050.html
   2) Change
       "Any space taken up by the scrollbars should be subtracted from the
        computed width/height, thus preserving the inner border edge."
      to
       "Any space taken up by the scrollbars should be excluded from
        (subtracted from the dimensions of) the containing block formed by
        the element with scrollbars."

i.e. remove the scrollbar texts from Chapter 10 and instead of saying how
the scrollbar affects the computation of the element itself, say that it's
excluded from the size of the containing block it forms for its children.

In other words, when looking at my parent's containing block, I take the
content box (or padding box, for abspos elements) minus the scrollbar size.
I think this will take care of all the relevant issues.

If you can figure out a clearer way to word that...

~fantasai
Received on Monday, 14 January 2008 20:32:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:57 GMT