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

proposed change for scrollbars in size calculations

From: Alex Mogilevsky <alexmog@exchange.microsoft.com>
Date: Mon, 7 Jan 2008 23:41:28 -0800
To: fantasai <fantasai.lists@inkedblade.net>, "www-style@w3.org" <www-style@w3.org>
CC: Rossen Atanassov <ratan@windows.microsoft.com>, Harel Williams <harelw@microsoft.com>
Message-ID: <04F36FB4ED0F85459AA447F72711526F012127484E1F@DF-GRTDANE-MSG.exchange.corp.microsoft.com>

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'.

(of course the spec should be changed only if we agree that this is exactly what is currently implemented)

        * 10.6.6 ("Complicated cases") includes the vertical
          equivalent of 10.3.3. (specified height and overflow not 'visible').
          In that case there isn't interop; we appear to favor FF3 implementation.
          Consider including the matching formula in CSS3.

        * Other cases can also include scrollbars (e.g. inlines or floats).
          Currently they don't mention scrollbars in any way, leaving
          the choice for UA. 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.

Received on Tuesday, 8 January 2008 07:41:32 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:33 UTC