Skip to content

[css-overflow] set element as document scrolling element #4710

@tylersticka

Description

@tylersticka

It's relatively straightforward to use overflow properties to make a child element of a page scroll independently of the document. But it's a much larger effort currently to allow "fullscreen" elements like modals, menus and dialogs to seamlessly become the primary scrolling element while "locking" the scroll of the parent page.

I suspect this is an overly optimistic idea, but in a perfect world this behavior would be as simple to define as this:

.menu.is-open {
  overflow: document;
}

(I was encouraged to submit this issue after writing about the idea.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions