- From: Danny Engelman <notifications@github.com>
- Date: Sun, 01 Jan 2023 07:11:49 -0800
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Sunday, 1 January 2023 15:12:01 UTC
This code https://jsfiddle.net/WebComponents/wajqfk3e/ ```html <style> ::part(main){ color:green; } </style> <wc-part-test></wc-part-test> <script> customElements.define('wc-part-test', class extends HTMLElement { constructor(){ super() .attachShadow({mode:"open"}) .innerHTML = `<style>::part(main){ background-color:red }</style>` + `<h1 part="main">Hello Web Component</h1>`; }}); </script> ``` Produces a colored background in FireFox 108.01:  And none in Chrome 108.05:  # "documentation" * https://github.com/fergald/docs/blob/master/explainers/css-shadow-parts-1.md Says: _"[::part] style inside a shadow tree, from **outside** of that shadow tree."_ * Some AI that often gives inclomplete answers says: _"To summarize, the ::part pseudo-element is used to style elements within a Shadow DOM shadow tree that have a part attribute. It **does not style the shadow root itself**._" # Conclusion? So I presume FireFox is wrong here? .. -- Reply to this email directly or view it on GitHub: https://github.com/WICG/webcomponents/issues/982 You are receiving this because you are subscribed to this thread. Message ID: <WICG/webcomponents/issues/982@github.com>
Received on Sunday, 1 January 2023 15:12:01 UTC