Open tomhodgins opened 4 years ago
Seems to me this could cause a cycle in quirks mode:
html, body:scrolling-element { overflow: auto }
body { overflow: visible }
If body
is the :scrolling-element
, then it gets overflow: auto
. But then it becomes potentially scrollable, so it stops being the scrollingElement.
So then it stops matching :scrolling-element
, and gets overflow: visible
instead. But then it stops being potentially scrollable, so it becomes the scrollingElement again!
Maybe :scrolling-element
could only work in non-quirks mode, but then it basically becomes :root:not(:quirks-mode)
. What's the use-case for that?
Hi everybody,
It would be nice if there was a CSS selector (e.g.
:scrolling-element
) that targeted the same element asdocument.scrollingElement
refers to in the Document API. Not sure if this has been proposed before or not but I couldn't find any previous mentions here.Thanks!