[w3c/webcomponents] Shadow root z-index/stacking context behaviour in custom element (#672)

There appears to be no mention in the current spec of the expected behaviour when creating a new CSS stacking context for a child node of a shadow root.

The use cases are tooltips/popups, custom drop-down lists, badges etc, where a child of the shadow root defines a new stacking context whose parent stacking context is outside of the custom element, and where the expected behaviour would be such that the child node is rendered over the custom element and its sibling elements in the normal document tree.

In the latest version of Chrome/Safari only `position: fixed;` renders a new stacking context outside of the custom element, all other [documented scenarios](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context) create a stacking context whose parent is rendered internally to the custom element.  I am unsure whether this is a browser bug or an undocumented requirement.

Declaring:

`<select><option value="value1">Value 1</option></select>`

In a custom element works as expected, where the list is rendered 'over' both the element declaring it and any adjacent siblings.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/672

Received on Saturday, 30 September 2017 09:31:45 UTC