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
<p><ahref="https://wicg.github.io/construct-stylesheets/" target="_blank">Constructable Stylesheets</a> and adoptedStyleSheets enable adding styles directly to shadow roots without creating new DOM elements. Because a single stylesheet object can be adopted by multiple scopes, it also allows sharing of styles that can be centrally modified.</p>
437
439
</section>
438
440
<section>
439
441
<h3>Status</h3>
440
442
<ul>
441
-
<li>---</li>
443
+
<li>Partial consensus; shipped in both <ahref="https://web.dev/constructable-stylesheets/" target="_blank">Chrome</a> and <ahref="https://bugzilla.mozilla.org/show_bug.cgi?id=1520690" target="_blank">Firefox</a></li>
442
444
</ul>
443
445
</section>
444
446
<section>
445
447
<h3>Initial API Summary/Quick API Proposal</h3>
446
-
<p>Summary or proposal based on current status; paragraph(s) and code.</p>
448
+
<p>The following is <ahref="https://web.dev/constructable-stylesheets/#using-constructed-stylesheets" target="_blank">an example</a> of what this would look like in practice.</p>
<li>There is no effective way to share styles across components while allowing them to be centrally modified.</li>
466
+
<li>Creating `<style>` elements for each style used in each shadow root has a measurable performance overhead.</li>
467
+
<li>CSS Module Scripts, another critical feature, depends on constructible stylesheets.</li>
468
+
</ul>
451
469
</section>
452
470
<section>
453
471
<h3>Concerns</h3>
454
-
<ul>
455
-
<li>---</li>
456
-
</ul>
472
+
<p>From their standards position tracker, Safari has highlighted some of the following concerns:</p>
473
+
<ul>
474
+
<li>Issues related to <ahref="https://github.com/WICG/construct-stylesheets/issues/45" target="_blank">race conditions</a> with adopting stylesheets and if the adoptedStyleSheets array should be directly mutable or not</li>
475
+
<li>There is concern that it is <ahref="https://github.com/whatwg/dom/pull/892#pullrequestreview-593774559" target="_blank">incompatible with Declarative Shadow DOM</a>.</li>
476
+
<li>Outstanding questions around <ahref="https://github.com/WICG/webcomponents/issues/870" target="_blank"><em>@import</em> statements in CSS Modules</a>.</li>
0 commit comments