Skip to content

Commit e30c5c7

Browse files
committed
fix(hub-ui): apply the Tailwind preflight reset in storybook
Storybook's preview never imported '@unocss/reset/tailwind.css', the same reset scripts/build-css.ts prepends to the shipped shadow-root stylesheet - unlike real dock content, stories inherited raw browser defaults (e.g. a text-variant ActionButton rendering as a native gray button). Import it first, matching the production build's [reset, ...] order.
1 parent 8a34e60 commit e30c5c7

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎packages/hub-ui/.storybook/preview.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
import type { Decorator, Preview } from '@storybook/vue3-vite'
2+
// The same Tailwind preflight `scripts/build-css.ts` prepends to the shipped
3+
// shadow-root stylesheet — first, so `virtual:uno.css`'s utilities (and the
4+
// hand-written `style.css`) win over its resets, matching the production
5+
// build's `[reset, userStyle, unoCss, ...]` order. Without it, stories miss
6+
// the reset (unstyled default `<button>`/`<ul>`/heading margins, …) real
7+
// dock content never shows once mounted in its actual shadow root.
8+
import '@unocss/reset/tailwind.css'
29
import 'virtual:uno.css'
310
import '@antfu/design/styles.css'
411
import '../src/client/style.css'

0 commit comments

Comments
 (0)