Skip to content

Commit 856844c

Browse files
committed
regenerate
1 parent 9bc72e7 commit 856844c

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

documentation/docs/98-reference/.generated/compile-warnings.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,9 +610,19 @@ Empty block
610610
Unused CSS selector "%name%"
611611
```
612612

613-
Svelte traverses both the template and the `<style>` tag to find out which of the CSS selectors are actually in use. It will prune (i.e. remove) those selectors which appear unused and warn you about it.
613+
Svelte traverses both the template and the `<style>` tag to find out which of the CSS selectors are not used within the template, so it can remove them.
614614

615-
In some situations Svelte may be too strict and you _know_ that the selector is used. In this case, you can use [`:global` or `:global(...)`](global-styles) to prevent them from being pruned.
615+
In some situations a selector may target an element that is not 'visible' to the compiler, for example because it is part of an `{@html ...}` tag or you're overriding styles in a child component. In these cases, use [`:global`](/docs/svelte/global-styles) to preserve the selector as-is:
616+
617+
```svelte
618+
<div class="post">{@html content}</div>
619+
620+
<style>
621+
.post :global {
622+
p {...}
623+
}
624+
</style>
625+
```
616626

617627
### element_invalid_self_closing_tag
618628

documentation/docs/98-reference/.generated/server-errors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
`%name%(...)` is not available on the server
77
```
88

9-
Certain methods such as `mount` cannot be invoked while running in a server context. Avoid calling them eagerly, i.e. not during the server render.
9+
Certain methods such as `mount` cannot be invoked while running in a server context. Avoid calling them eagerly, i.e. not during render.

0 commit comments

Comments
 (0)