From ef9883683ff986bee9bf89501f1cdc3c3ef8eb9c Mon Sep 17 00:00:00 2001 From: Kyle Messner Date: Wed, 25 Mar 2026 09:46:53 -0400 Subject: [PATCH] docs(extras): update addGlobalStyleToComponents documentation --- docs/config/extras.md | 8 ++++++-- versioned_docs/version-v4.43/config/extras.md | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/config/extras.md b/docs/config/extras.md index 70085fc9e..4760337e8 100644 --- a/docs/config/extras.md +++ b/docs/config/extras.md @@ -178,9 +178,13 @@ For browsers that do not support shadow dom (IE11 and Edge 18 and below), slot i ### addGlobalStyleToComponents -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. +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. -You can turn this behavior off by setting this flag to `false`. +If you want to also add the `globalStyle` to each component when rendering on the server +then set this to `true`. If your `globalStyle` sheet is large then doing this may bloat the size +of your SSR output when using [`declarative-shadow-dom`](../guides/server-side-rendering.md#serializeShadowRoot). + +Setting this to `false` will stop `globalStyle` from being added to any component. ### additionalTagTransformers diff --git a/versioned_docs/version-v4.43/config/extras.md b/versioned_docs/version-v4.43/config/extras.md index 70085fc9e..4760337e8 100644 --- a/versioned_docs/version-v4.43/config/extras.md +++ b/versioned_docs/version-v4.43/config/extras.md @@ -178,9 +178,13 @@ For browsers that do not support shadow dom (IE11 and Edge 18 and below), slot i ### addGlobalStyleToComponents -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. +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. -You can turn this behavior off by setting this flag to `false`. +If you want to also add the `globalStyle` to each component when rendering on the server +then set this to `true`. If your `globalStyle` sheet is large then doing this may bloat the size +of your SSR output when using [`declarative-shadow-dom`](../guides/server-side-rendering.md#serializeShadowRoot). + +Setting this to `false` will stop `globalStyle` from being added to any component. ### additionalTagTransformers