-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Description
/playground/themes uses raw HTML elements with data attributes instead of the actual Rokkit Svelte components. This makes the page misleading and means theme styles are not verified properly — component-internal markup (icons, spinners, label slots, state management) is absent.
Playwright-Verified Evidence
Buttons — 7 of 10 themes show identical rokkit gradient
Inspected via Playwright getComputedStyle:
| Theme | background-image on [data-button][data-variant="primary"] |
|---|---|
| rokkit | linear-gradient(in oklch, orange 0%, pink 100%) ✅ intentional |
| minimal | none ✅ flat fill |
| material | none ✅ flat fill |
| glass | rokkit gradient ❌ |
| shadcn | rokkit gradient ❌ |
| daisy-ui | rokkit gradient ❌ |
| bits-ui | rokkit gradient ❌ |
| carbon | rokkit gradient ❌ |
| ant-design | rokkit gradient ❌ |
Those 5 new themes have no button CSS of their own and fall back to the base gradient.
Also: data-style is being set on individual <button> elements (for outline/ghost style), which overrides the parent [data-style="{theme}"] scope. Button's own data-style prop means something different (outline/ghost style), not the theme name.
Input — whitish border is Tailwind bleed
rokkitinput:borderColor: rgb(229, 231, 235)— this is Tailwindborderclass default (gray-200), NOT from the thememinimalinput: all 4 borders are1px solid— should be bottom border only (underline style)minimalinput:transition: background-color 0.15s— underline focus animation not wired up
Card — same Tailwind border bleed
rokkitCard:borderColor: rgb(229, 231, 235)— from theborderTailwind class on the raw div, not the theme
Toggle — native checkbox, not <Switch>
The page uses <input type="checkbox"> wrapped in a <label>. The <Switch> component exists and should be used.
What Needs to Change
Replace every raw element in site/src/routes/(play)/playground/themes/+page.svelte with the actual component:
| Current (raw) | Replace with |
|---|---|
<button data-button data-variant=... data-style=...> |
<Button variant=... style=...> from @rokkit/ui |
<div data-input-root><input ...></div> |
<Input ...> from @rokkit/forms |
<input type="checkbox"> in label |
<Switch ...> from @rokkit/ui |
<div data-card><div data-card-header>...</div>...</div> |
<Card> with {#snippet header()} from @rokkit/ui |
Also remove the bare border Tailwind classes — let theme CSS own all borders.
Additional Issues Found
These should be fixed alongside or tracked separately:
- Missing
accent/tertiarybutton variant — the themes page only shows default/primary/secondary/danger/outline/ghost. Anaccentvariant should be added since the token exists. - Material theme: inputs need floating label — material style requires the label to sit inline then float up on focus. Raw
<input placeholder>cannot implement this; needs the<Input>component with a label prop. - Minimal theme: underline input not implemented — bottom-border-only with focus animation is not rendering correctly.
- 5 new themes have no button CSS — glass, shadcn, daisy-ui, bits-ui, carbon, ant-design need theme-specific button styles defined.
Affected File
site/src/routes/(play)/playground/themes/+page.svelte