Skip to content

Commit 122f2a8

Browse files
authored
docs: clarify use of emojis in useStylesScoped$ (#7257)
1 parent 55d3bfc commit 122f2a8

File tree

1 file changed

+5
-0
lines changed
  • packages/docs/src/routes/docs/(qwik)/components/styles

1 file changed

+5
-0
lines changed

packages/docs/src/routes/docs/(qwik)/components/styles/index.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,11 @@ export const Cmp = component$(() => {
187187
## Scoped CSS
188188

189189
To use scoped CSS, you can use the `useStylesScoped$()` hook exported from `@builder.io/qwik`.
190+
> `useStylesScoped$()` uses emojis to set a unique name on the selector. This is added by Qwik to avoid CSS name / selector clashes, and to ensure that the styles are correctly scoped as expected..
191+
192+
193+
194+
190195

191196
```tsx {4-8} title="src/components/MyComponent/MyComponent.tsx"
192197
import { component$, useStylesScoped$ } from '@builder.io/qwik';

0 commit comments

Comments
 (0)