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
Pre-applies CSS styles to a component before rendering it. Using the following syntax:
5
+
Extends the [rendering pipeline]() to prepend stylesheet(s) for a component. It will be added to either the start of the shadow root if one exists, or scoped and added once in the `head`.
6
+
7
+
Using the following syntax:
6
8
7
9
```html
8
10
<component-namecss="styles.css">
9
11
```
10
12
11
-
A style tag with the CSS styles from the specified resource will be added to the beginning of the Shadow Root
13
+
A `style` tag with the CSS styles from the specified resource (`ripple('styles.css')`) will be added to the beginning of the shadow root.
12
14
13
15
```html
14
-
<styleresource="styles.css">/* ... */</style>
16
+
<component-namecss="styles.css">
17
+
#shadow-root
18
+
<styleresource="styles.css">/* ... */</style>
15
19
```
16
20
17
-
If there is no Shadow DOM, the styles will scoped and added to the end of the document head. The style tags are deduped so there will only be one for each specfic CSS resource in use.
21
+
If there is no shadow, the styles will scoped and added to the end of the document `head`. The style tags are deduped so there will only be one for each specfic CSS resource in use.
0 commit comments