Re: [cssom] Element size/positioning information

Le Lun 11 avril 2011 15:00, Boris Zbarsky a écrit :
> On 4/11/11 2:35 PM, Tab Atkins Jr. wrote:


>> All in all, these are the boxes that we might want to get sizing
>> information about:
>>
>> 1. content box, ignoring scrollbars
>  > 2. content box, subtracting scrollbars
>
> What does this mean, exactly?  Scrollbars go into the padding,
> generally...



Scrollbar go between outer edge of padding box and inner edge of border box.

Where scrollbar(s) go is one question.


> They don't usually affect the size of the content box,
> right?


They do.

I had an old testcase on this and found it!

http://www.gtalbot.org/BugzillaSection/ClientHeightComparison.html


How scrollbar(s) can affect clientHeight|clientWidth is another question.

>
>> 3. content box, scrollable area
>
> Is this meant to be the thing scroll* currently returns?
>
>> 4. padding box (+/- scrollbars?  Depends on exactly where the impl
>> puts the scrollbars.)

This has been answered by CSS 2.1:

"
In the case of a scrollbar being placed on an edge of the element's box,
it should be inserted between the inner border edge and the outer padding
edge. Any space taken up by the scrollbars should be taken out of
(subtracted from the dimensions of) the containing block formed by the
element with the scrollbars.
"
http://www.w3.org/TR/CSS21/visufx.html#overflow



Tab, you may want to check my DHTML demo on these properties:

http://www.gtalbot.org/BugzillaSection/DocumentAllDHTMLproperties.html

regards, Gérard
-- 
CSS 2.1 Test suite RC6, March 23rd 2011
http://test.csswg.org/suites/css2.1/20110323/html4/toc.html

Contributions to CSS 2.1 test suite
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

Web authors' contributions to CSS 2.1 test suite
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/web-authors-contributions-css21-testsuite.html

Received on Tuesday, 12 April 2011 01:13:59 UTC