#shadowroot
Importers can then define those elements in a scoped custom element registry for the consumer (for example, a custom element with a ShadowRoot in which the library elements are used).
November 4, 2026 at 6:18 AM
As an aside: I'm confused on what all is being considered CSS-in-JS at this point. Is using adoptedStyleSheets on a web component's shadowRoot considered CSS-in-JS, in the scenario where the CSS is still written as CSS via replace/replaceSync, or is it only when JS sets styles directly on elements?
October 8, 2026 at 10:49 PM
Shadow DOM no longer requires JavaScript.

You can now write it directly in HTML (Part 2).

It uses a template tag with shadowrootmode=open.

The browser creates the shadow root during HTML parsing.

No client-side script is needed to display it.

#WebComponents #HTML #WebDev

1/3
October 5, 2026 at 8:00 AM
👽Bugs in Freedom Garden!🤘🐛🐞🪲
💀Morphy finds new bug in Freedom Garden#growth#morphe #morphy#growcommunity #shadowroot#satisfying👽
YouTube video by Morphy And The Apprentice
youtube.com
September 27, 2026 at 1:27 AM
The important nuance is that the boundary changes the shape of the work, not just the amount of it. You pay some per-ShadowRoot setup and 'bookkeeping' cost, but in return the engine gets a clearer containment boundary for selector matching and many kinds of style invalidation.
September 21, 2026 at 4:03 PM
🦖 ShadowRoot: mode property 🦖

https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/mode

The mode read-only property of the ShadowRoot specifies its mode — either open or closed. This defines whether or not the shadow root's internal features are accessible from JavaScript.

#webdev
ShadowRoot: mode property
The mode read-only property of the ShadowRoot specifies its mode — either open or closed. This defines whether or not the shadow root's internal features are accessible from JavaScript.
developer.mozilla.org
September 8, 2026 at 7:19 PM
@bitmae.bsky.social Here's what I was imagining about this,






The is slotted into the ShadowRoot of , *shadow* exploding your alter-ego. 😄

Live demo:

rawcdn.githack.com/lume/lume/0b...
September 1, 2026 at 7:17 PM
So, what I'm really saying is, when I introduce ShadowDOM for composition (yay), I don't want to break styling. What I really want is to be able to introduce a ShadowRoot to any element, for the sake of composition, *without* having to necessarily change the styling system too.
December 17, 2025 at 9:03 PM
There's a bug in all browsers in which a custom element's `ElementInternals.shadowRoot` will return `null` even if the element has a `ShadowRoot`, perhaps due to a issue in the spec:

github.com/whatwg/dom/i...
[ElementInternals] `ElementInternals.shadowRoot` is `null` but `this.shadowRoot` is not (its a `ShadowRoot`) · Issue #1365 · whatwg/dom
What is the issue with the DOM Standard? I've found a situation in which an element's ElementInternals.shadowRoot property is not in sync with the actual state of the DOM, i.e. when an open ShadowR...
github.com
April 6, 2025 at 6:50 PM
It won't work if that markup is inside another ShadowRoot, as we need JS to create ShadowRoots. A workaround is have the HTML payload include the Declarative Shadow DOM (DSD), but that would require server-side rendering (SSR) or static site generation (SSG) unless you write the DSD markup manually.
March 11, 2025 at 6:29 PM
Yeah for sure. They are improving incrementally now, but the whole bag gets bigger over time.

If you're not using a ShadowRoot, you could use MutationObserver as the standard way to observe children. It'll fire whenever children are ready or have changed.
March 10, 2025 at 8:04 PM
The standard reliable solution would be to use a ShadowRoot, a default <slot> for the content, then listen to the slot's slotchange event to handle content no matter when it exists or when it changes in the future.
March 10, 2025 at 7:27 PM
It would be interesting to integrate this into Lume. Because it is a standard custom element, I can grab the canvas and wire it up:

<lume-mesh ...>
<lume-shaderview-material />
</lume-mesh>

where <lume-shaderview-material> has <shaderview> in its ShadowRoot and makes a THREE.CanvasTexture
March 2, 2025 at 2:21 AM
*editing markdown tables is so fun!*
June 22, 2026 at 9:52 PM
the only thing in theory it should do is allow you to call `.focus()` on it. and thats it. but it seems the behavior is "if it has a shadowroot, ignore everything in the shadow dom, including slotted elements that are in the light dom"
December 4, 2024 at 10:00 PM
it's not just presentation, it's buggy.

FYI it's referencing an element in ShadowRoot so perhaps that's related. It also doesn't happen consistently.
June 17, 2026 at 7:51 AM
This one was caused by some mix of styles / shadowRoot / adoptedStyleSheets, it’s fixed but unfortunately I’m still not sure what exactly triggered it
September 17, 2025 at 12:27 PM
2 hours in, it seems to have to do with the `adoptedStyleSheets` property on `shadowRoot`
September 17, 2025 at 7:09 AM
As a library developer the * selector has always been problematic.

It basically forces you to override every commonly used CSS prop in your component.

I've ran into customers having `* { transition: all .25s }` in their stylesheet. 🫠

Luckily nowadays we have `shadowRoot` and `unset`.
September 5, 2025 at 4:53 PM
I _was_ setting styles on `:host()`, now switching to styles on `<slot>` or an element inside the shadowRoot.
July 4, 2025 at 6:32 AM
TIL declaring a CSS `@property` doesn't work inside a `shadowRoot` 🫠
March 11, 2025 at 2:51 PM
I'm really struggling with defining FilePond as a Web Component with shadowRoot.

For example, conditionally loading a Video player gets really tricky when everything is a Svelte powered component in a Web Component.

Have to move forward, so opting for only the custom <file-pond> element for now.
December 28, 2024 at 3:24 PM
313131 – Base select inside shadowroot doesn't create shadowtree for option elements
bugs.webkit.org
April 23, 2026 at 2:34 PM