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 DOM trees, e.g. `document` and 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>
492
494
</section>
493
495
<section>
494
496
<h3>Status</h3>
495
497
<ul>
496
-
<li>---</li>
498
+
<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>
497
499
</ul>
498
500
</section>
499
501
<section>
500
502
<h3>Initial API Summary/Quick API Proposal</h3>
501
-
<p>Summary or proposal based on current status; paragraph(s) and code.</p>
503
+
<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>
521
+
<li>Creating `<style>` elements for each style used in each shadow root has a measurable performance overhead.</li>
522
+
<li>CSS Module Scripts, another critical feature, depends on constructible stylesheets.</li>
523
+
</ul>
506
524
</section>
507
525
<section>
508
526
<h3>Concerns</h3>
509
-
<ul>
510
-
<li>---</li>
511
-
</ul>
527
+
<p>From their standards position tracker, Safari has highlighted some of the following concerns:</p>
528
+
<ul>
529
+
<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>
530
+
<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>
531
+
<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