Skip to content

[css-backgrounds][css-overflow] Is viewport's background painted behind viewport's scrollbars? #12744

@Loirooriol

Description

@Loirooriol

If both the background and the overflow get propagated to the viewport, what happens?

https://drafts.csswg.org/css-backgrounds-3/#root-background
https://drafts.csswg.org/css-overflow-3/#overflow-propagation

<!DOCTYPE html>
<iframe width="100" height="100" srcdoc="
  <style>
  :root {
    background: cyan;
    scrollbar-color: rgb(255, 0, 255, 0.5) rgb(255, 0, 255, 0.5);
    overflow: scroll;
  }
  ::-webkit-scrollbar { background-color: rgb(255, 0, 255, 0.5); width: 12px; height: 12px; }
  </style>
"></iframe>
Gecko Blink WebKit

I would expect the background to be painted behind the scrollbar like in a normal element, and be able to change that with background-clip: content-box (but that never works, see #11169)

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