- From: Kurt Catti-Schmidt <notifications@github.com>
- Date: Wed, 25 Mar 2026 18:16:55 -0700
- To: w3ctag/design-reviews <design-reviews@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3ctag/design-reviews/issues/1195/4130874751@github.com>
KurtCattiSchmidt left a comment (w3ctag/design-reviews#1195) I moved the `shadowrootadoptedstylesheets` to a [separate explainer](https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/ShadowDOM/explainer.md), as it was getting fairly large. It sounds like we do want to fetch, but I think the `<link>` tag has a few major issues: 1. `<link rel="stylesheet">` today respects DOM order for stylesheet application and mapping them to an array (`adoptedStyleSheets`) becomes expensive to track across DOM mutations. We don't want to need to check on every DOM mutation if `adoptedStyleSheets` needs updating. Not respecting DOM mutations would be strange too. A fixed attribute like `shadowrootadoptedstylesheets` makes this fixed at parse time, which seems much simpler. 2. With lots of shadow DOM elements, having several `<link>` tags in each could easily add hundreds of extra elements to the DOM. 3. There are already 2 style-related `<link>` tags (`stylesheet` and `modulepreload`), and I'm not sure that adding a third that's contextual will be easily understood. We could address issues 1 and 2 by making the proposed `<link>` version disappear from the DOM like `<template shadowrootmode="open">` does, but then we lose error handling (as there's no element to fire the event on) and still have 3) to contend with. The lack of error handling and FOUC caused by fetching from `shadowrootadoptedstylesheets` isn't great, but `modulepreload` already has error handling and can prevent an FOUC, and *should* be utilized if a developer wants to fetch from `shadowrootadoptedstylesheets` anyways. So that's the route proposed in the [dedicated explainer](https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/ShadowDOMAdoptedStyleSheets/explainer.md). Lots more detail in that proposal. Definitely interested in your input @jyasskin, @bkardell @justinfagnani @sorvell -- Reply to this email directly or view it on GitHub: https://github.com/w3ctag/design-reviews/issues/1195#issuecomment-4130874751 You are receiving this because you are subscribed to this thread. Message ID: <w3ctag/design-reviews/issues/1195/4130874751@github.com>
Received on Thursday, 26 March 2026 01:16:59 UTC