File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -292,11 +292,11 @@ class FancyArticleElement extends HTMLElement {
292292### Using CSS Module scripts
293293
294294CSS Module scripts allow developers to import stylesheets as if they were a module script. To do so, use an import
295- assertion where the ` type ` is ` css ` and then you can add the imported stylesheet to the ` adoptedStyleSheets ` array for
295+ attribute where the ` type ` is ` css ` and then you can add the imported stylesheet to the ` adoptedStyleSheets ` array for
296296the element's shadow root.
297297
298298``` js
299- import stylesheet from " ./fancy-article-element.css" assert { type : "css " }
299+ import stylesheet from " ./fancy-article-element.css" with { type : "css " }
300300
301301class FancyArticleElement extends HTMLElement {
302302 connectedCallback () {
@@ -305,4 +305,10 @@ class FancyArticleElement extends HTMLElement {
305305}
306306```
307307
308+ Note that import assertion (the old name for import attributes) has been deprecated. The following will not work in :
309+
310+ ``` js
311+ import stylesheet from " ./fancy-article-element.css" assert { type : "css " }
312+ ```
313+
308314[ css-custom-properties ] : https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties
You can’t perform that action at this time.
0 commit comments