Skip to content

How should UAs hide root element scrollbars? #236

@nt1m

Description

@nt1m

What is the issue with the Fullscreen API Standard?

All existing UAs currently hide the root element scrollbars when fullscreen, but they all do so in different ways:

  • Chrome & Firefox I believe have special logic that prevents scrolling + hides scrollbars
  • Safari has an overflow: hidden !important UA rule on *|*:root:-webkit-full-screen-document:not(:fullscreen)

I wonder if we can get a standardized way of doing this. Something like:

*|*:root:has(:fullscreen) {
    overflow: hidden | clip !important;
}

(UAs may not necessarily want to use :has() for performance reasons, but the idea would be something like Safari implements).

Also, not sure if clip or hidden is closer to the wanted behavior here, but I think I'd be OK with either.

cc @whatwg/css

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions