Commit fc2bb3c
committed
fix(json-render-ui): add the missing CSS reset to the SPA and Storybook
`btn-action` / `btn-action-sm` (what `Button.ts` maps the `secondary` and
`ghost` variants onto) set a border and `op75` but no base
`background-color` — only one on `:hover`. Without a CSS reset the UA
default `button { background-color: buttonface }` therefore wins, and every
non-primary button renders as a solid light-grey box on the dark canvas.
`scripts/build-css.ts` prepends `@unocss/reset/tailwind.css` to the
shadow-root stylesheet, so the dock renderer was never affected. The two
light-DOM surfaces have to import the reset themselves and neither did:
the shipped SPA bundle and the Storybook canvas both contained zero reset
rules (`-webkit-appearance:button`, `background-image:none`,
`box-sizing:border-box` all absent from the built CSS).
`packages/hub-ui/.storybook/preview.ts` already does exactly this, with a
comment describing the same symptom; `json-render-ui` simply never got the
same line. `hub-ui` ships no light-DOM SPA, so it is not affected.1 parent 938b222 commit fc2bb3c
5 files changed
Lines changed: 28 additions & 1 deletion
File tree
- packages/json-render-ui
- .storybook
- src
- spa
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
2 | 5 | | |
3 | 6 | | |
4 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
131 | 140 | | |
132 | 141 | | |
133 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
7 | 18 | | |
8 | 19 | | |
9 | 20 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments