Commit 4d54441
fix(storybook): sb-unstyled toevoegen aan PreviewFrame om font-size override op te lossen
Storybook's docs-pagina CSS bevat een regel
'.css-qa4clq :where(div:not(.sb-anchor, .sb-unstyled, .sb-unstyled div))'
die font-size: 16px instelde op alle divs in de docs-pagina. Doordat deze
selector dezelfde specificiteit had als .dsn-body en later geladen werd,
overschreef die de token-waarde var(--dsn-text-font-size-md). Componenten
als Card en Details toonden daardoor een verkeerde font-size in het visuele
voorbeeld op Docs-pagina's — ondanks dat losse stories wél correct werkten.
De 'sb-unstyled' class sluit de wrapper én al zijn kind-divs expliciet uit
van die Storybook-reset.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 8c86227 commit 4d54441
3 files changed
Lines changed: 12 additions & 1 deletion
File tree
- docs
- packages/storybook/src/components
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
| 290 | + | |
290 | 291 | | |
291 | 292 | | |
292 | 293 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
9 | 19 | | |
10 | 20 | | |
11 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
0 commit comments