Csswg-drafts: [cssom-view] "Elements and viewports have an associated scrol..."

Created on 13 Jun 2017  Â·  6Comments  Â·  Source: w3c/csswg-drafts

https://drafts.csswg.org/cssom-view/#terminology

Elements and viewports have an associated scrolling box if has a scrolling mechanism or it overflows its content area and the used value of the overflow-x or overflow-y property is hidden. [CSS3-BOX]

An element is potentially scrollable if all of the following conditions are true:​

The element has an associated CSS layout box.
The element is not the HTML body element, or it is and the root element’s used value of the overflow-x or overflow-y properties is not visible.
The element’s used value of the overflow-x or overflow-y properties is not visible.
Note:​ An element that is potentially scrollable might not have a scrolling box. For instance, it could have overflow set to auto but not have its content overflowing its content area.

The definition of scrolling box looks wrong. Certainly scroll and auto should also cause a scrolling box.

The definition of potentially scrollable also looks wrong w.r.t. overflow: clip.

Help Wanted cssom-view-1

Most helpful comment

Scrolling box I think should be defined as there being a scroll container and scrollable overflow.

All 6 comments

Ah, now I see. overflow: scroll causes a "scrolling mechanism". I think this needs clearer grouping, with a list.

The scrolling box definition here should be removed in favor of css-overflow's "scroll container"... or maybe the "scrollport"

cc @dbaron @frivoal

The definition of potentially scrollable also looks wrong w.r.t. overflow: clip.

Actually I think it's not wrong. https://drafts.csswg.org/css-overflow-3/#overflow-propagation only checks 'visible', and potentially scrollable should match up with that.

Scrolling box I think should be defined as there being a scroll container and scrollable overflow.

I think this causes a problem when this definition is combined with step 10 of When setting the scrollTop attribute these steps must be run: of section 6 which reads:

  1. If the element does not have any associated CSS layout box, the element has no associated scrolling box, or the element has no overflow, terminate these steps.
Was this page helpful?
0 / 5 - 0 ratings