Re: [csswg-drafts] [fullscreen] Details on how top layer elements interact with their ancestors (#6939)

> Should top layer elements "escape" ancestor visibility? Currently they escape ancestor opacity/masks/overflow. Are there other properties they should escape? From the current spec, what "etc." is isn't clear:

Imo, they should act as if they were reparented to be siblings of the root element. That's how they exist in the box tree, and we shouldn't overcomplicate things (like we've done with some abspos+clipping stuff) by applying effects from elements that aren't in their box-tree ancestor chain.

`visibility`, as @vmpstr says, isn't a container effect, it just inherits down and affects each element individually. Inheritance still works as normal, so a top-layer element with a `visibility: hidden` ancestor (and no closer ancestor setting `visible`) will be hidden.

> What happens when the ancestor is replaced content or display: table-column?

Same as previous answer - since it was reparented in the box tree, its container effects that would suppress rendering no longer apply. The top-layer elements should display in both of these cases, imo.

> Should top layer elements "escape" ancestor pointer-events? In all 3 current implementations the answer is no, ancestor pointer-events propagate to <dialog>, would be nice to make that clear!

Like `visibility`, `pointer-events` isn't a container effect, just an inherited property, so it should continue to apply to the dialog as normal based on inheritance.

> Not sure "If it consists of multiple layout boxes, the first box is used." should be kept, this currently isn't tested, and is quite vague.

Yeah this needs to be rewritten a little for clarity. It's just to address what we do if an element generates multiple sibling boxes; only the [principal box](https://drafts.csswg.org/css-display/#principal-box) is positioned by positioning schemes.

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 19 January 2022 15:45:41 UTC