W3C home > Mailing lists > Public > public-css-archive@w3.org > August 2020

[csswg-drafts] [css-overflow] Is it necessary to support nested scrollers for html and body? (#5403)

From: George Steel via GitHub <sysbot+gh@w3.org>
Date: Thu, 06 Aug 2020 01:18:41 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-673945198-1596676720-sysbot+gh@w3.org>
george-steel has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-overflow] Is it necessary to support nested scrollers for html and body? ==
Moved from <https://crbug.com/580570> (2016):

> The CSS spec says that "html { overflow: scroll; }" and "body { overflow: scroll; }" are equivalent - in both cases you're just setting the scrolling mode of the viewport.  But "html, body { overflow: scroll; }" is special - in that case body actually get's its own scrolling box independent from the viewport.

> This is widely supported, but can be a little confusing. Let's explore whether this behavior is really necessary for web compatibility.  We could potentially simplify things by saying that overflow applied to body ALWAYS applies to the viewport.

This is currently the case in [css-overflow-3](https://drafts.csswg.org/css-overflow-3/#overflow-propagation) which says that
> UAs must apply the overflow-* values set on the root element to the viewport. However, when the root element is an [HTML] html element (including XML syntax for HTML) whose overflow value is visible (in both axes), and that element has a body element as a child, user agents must instead apply the overflow-* values of the first such child element to the viewport. The element from which the value is propagated must then have a used overflow value of visible.

This further clarified in [cssom-view](https://drafts.csswg.org/cssom-view/#potentially-scrollable) and is the current behavior in both chrome and firefox as confirmed by https://codepen.io/george-steel/pen/mdPdQgw, which produces two sets of scrollbars.

Is there any use for this behavior, or should be simplified?


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5403 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 6 August 2020 01:18:43 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:13 UTC