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

Re: [csswg-drafts] [css-overflow] CSSOM scrollWidth/scrollHeight behaviour of "overflow: clip". (#5572)

From: x-Jake-x via GitHub <sysbot+gh@w3.org>
Date: Fri, 02 Oct 2020 07:09:58 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-702566909-1601622597-sysbot+gh@w3.org>
It sounds like [Issue 3](https://drafts.csswg.org/css-overflow-3/#issue-3eeb0988) is moot, in that case, as clipped content wouldn't be seen as scrollable.

This seems to me as though this makes the only difference between `clip` and `hidden` to be that `clip` is considered non-scrollable, while `hidden` is considered programmatically scrollable.

Was the intent at any point to make it so that content in a clipped overflow would be clipped by the containing element's box, permanently, so that it would never show? Or was the intent to simply deal with scrolling using "scrollLeft" and "scrollTop", continuing to leave the contents programmatically manipulable in a simulated scrolling fashion (as in the above examples) using means other than scrolling?

It sounds like the decision to limit the "scrollWidth" and "scrollHeight" to the area of the containing elements box makes sense, as the element would technically be "not scrollable" (despite the not visible contents still being available through programmatic manipulation). However, I feel like this removes an easy way to determine the width and height of the content of the containing element, which still exist despite "clip" being set. Child elements of a clipped container would need to be contained inside another non-clipped element to easily get their total "scrollWidth" and "scrollHeight".

...I wanted to create an example to demonstrate this to myself, but I can't because `Chrome/85.0.4183.123` and `Chrome/85.0.4183.121` report the full width of the content area of the containing element. They don't limit it just the width of the containing box. Where can I test what Blink is currently doing @bfgeek?

Here is my base test case for what you gave: https://jsfiddle.net/6hfgm4yx/

-- 
GitHub Notification of comment by x-Jake-x
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5572#issuecomment-702566909 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 2 October 2020 07:10:05 UTC

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