You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #6939 (comment) a change was made to set visibility: visible on modal dialogs. This overwrites any visibility set on a parent element, so visibility: hidden on a parent would not hide the modal dialog.
I don't think the two properties necessarily have anything to do with each other, similarity in name notwithstanding.
That said, consistency with my position in January suggests that c-v:hidden shouldn't have an effect on something in the top layer, as its position in the box tree no longer sees a hidden ancestor.
(We had to add special carve-outs for visibility and pointer-events because they're inherited properties evaluated on the element itself, rather than non-inherited properties that apply an effect to a subtree.)
We've also resolved separately (#6728) to say that elements in c-v hidden subtrees will not have boxes in the top layer, since that can cause performance problems (ie style is not updated on the element because of c-v hidden ancestor but that ancestor isn't there in the layout tree).
I do think it is a bit confusing that visibility has a special carve out and that content-visibility doesn't, perhaps we should undo #6939 (comment) ? Right now only WebKit/Safari implements this resolution, Firefox & Chrome haven't gotten around to it yet.
Like I said, the carve-outs exist solely because those properties are inherited (and thus determine whether or not they apply solely on the element tree, which is unaffected by top-layer, since that only affects the box tree). The two properties are completely unrelated other than the fact that they both have the word 'visibility' in their name.
In #6939 (comment) a change was made to set visibility: visible on modal dialogs. This overwrites any visibility set on a parent element, so visibility: hidden on a parent would not hide the modal dialog.
For content-visibility however the expectation is different. This test verifies that content-visibility: hidden hides the complete subtree, including the modal dialog:
https://github.com/web-platform-tests/wpt/blob/830ae49918/css/css-contain/content-visibility/content-visibility-with-top-layer-002.tentative.html
To me this feels inconsistent and potentially confusing to web developers. Thoughts?
The text was updated successfully, but these errors were encountered: