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
Copy file name to clipboardExpand all lines: docs/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -667,7 +667,7 @@ The style output:
667
667
```
668
668
669
669
## Custom Component Style
670
-
On a page, you can use the `<StyleContent>` component to add styles, but you can't use StyleContent in custom component, so if you need to add astyle to the head in the custom component, you need to use the `Register` method in the `StyleHelper` class to register the style.
670
+
On a page, you can use the `<StyleContent>` component to add page-specificstyles. However, StyleContent cannot be used inside custom components. For example, if you create a `<DemoComponent>` component, how can you inject its styles into the `<head>` tag? CssInCsharp provides a global helper class called `StyleHelper`. You can usethe `Register` method to inject styles into the `<head>` tag.
0 commit comments