From 354cdf22b26aabafed33675a759c2c39735bd905 Mon Sep 17 00:00:00 2001 From: Geoff Rich Date: Fri, 30 Apr 2021 12:10:25 -0700 Subject: [PATCH] Add docs for compound :global selector --- site/content/docs/01-component-format.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/site/content/docs/01-component-format.md b/site/content/docs/01-component-format.md index 09451701a0..e3e423526f 100644 --- a/site/content/docs/01-component-format.md +++ b/site/content/docs/01-component-format.md @@ -277,6 +277,12 @@ To apply styles to a selector globally, use the `:global(...)` modifier. to this component */ color: goldenrod; } + + p:global(.red) { + /* this will apply to

elements belonging to this + component that have the class "red" dynamically + applied (e.g. via node.classList.add) */ + } ```