Skip to content

Commit b7041db

Browse files
docs(extras): update addGlobalStyleToComponents documentation (#1588)
1 parent bffe057 commit b7041db

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

docs/config/extras.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,13 @@ For browsers that do not support shadow dom (IE11 and Edge 18 and below), slot i
178178

179179
### addGlobalStyleToComponents
180180

181-
By default, when using the [`globalStyle`](./01-overview.md#globalstyle) config setting, any assigned stylesheet will also be added as a [constructable stylesheet](../components/styling.md#constructable-stylesheets) to each component in the published library.
181+
By default, when using the [`globalStyle`](./01-overview.md#globalstyle) config setting, any assigned stylesheet will also be added as a [constructable stylesheet](../components/styling.md#constructable-stylesheets) to each client-rendered component in the published library.
182182

183-
You can turn this behavior off by setting this flag to `false`.
183+
If you want to also add the `globalStyle` to each component when rendering on the server
184+
then set this to `true`. If your `globalStyle` sheet is large then doing this may bloat the size
185+
of your SSR output when using [`declarative-shadow-dom`](../guides/server-side-rendering.md#serializeShadowRoot).
186+
187+
Setting this to `false` will stop `globalStyle` from being added to any component.
184188

185189
### additionalTagTransformers
186190

versioned_docs/version-v4.43/config/extras.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,13 @@ For browsers that do not support shadow dom (IE11 and Edge 18 and below), slot i
178178

179179
### addGlobalStyleToComponents
180180

181-
By default, when using the [`globalStyle`](./01-overview.md#globalstyle) config setting, any assigned stylesheet will also be added as a [constructable stylesheet](../components/styling.md#constructable-stylesheets) to each component in the published library.
181+
By default, when using the [`globalStyle`](./01-overview.md#globalstyle) config setting, any assigned stylesheet will also be added as a [constructable stylesheet](../components/styling.md#constructable-stylesheets) to each client-rendered component in the published library.
182182

183-
You can turn this behavior off by setting this flag to `false`.
183+
If you want to also add the `globalStyle` to each component when rendering on the server
184+
then set this to `true`. If your `globalStyle` sheet is large then doing this may bloat the size
185+
of your SSR output when using [`declarative-shadow-dom`](../guides/server-side-rendering.md#serializeShadowRoot).
186+
187+
Setting this to `false` will stop `globalStyle` from being added to any component.
184188

185189
### additionalTagTransformers
186190

0 commit comments

Comments
 (0)