fix: remove double top spacing and match shared theme to app palette
Lint / Lint (push) Successful in 42s
Tests / Go backend (push) Successful in 32s
Tests / Dashboard checks (push) Successful in 42s
Docker / Docker Build & Push (push) Successful in 3m4s

- The dashboard and list-detail page roots' own p-4 stacked on top of
  the shared page title box's margin-bottom (padding never collapses
  with margin) - drop the top half so there's a single, consistent gap.
- Remap the shared component library's --sc-* tokens onto this app's
  own --color-* palette so the header, page title box, dialogs, and
  buttons all render in-brand instead of the generic default theme.
This commit is contained in:
Gabriel20xx committed 2026-08-19 16:58:43 +02:00
1 parent e70779a01f
commit f1b52a4fa6
3 files changed
+38 -2

No files matched your search

@@ -36,6 +36,7 @@
<AuthPage setupRequired={auth.status?.setupRequired ?? true} /> <AuthPage setupRequired={auth.status?.setupRequired ?? true} />
{:else} {:else}
<SharedAppShell <SharedAppShell
class="collabtable-shell"
brand="CollabTable" brand="CollabTable"
currentPath={page.url.pathname} currentPath={page.url.pathname}
{navItems} {navItems}
@@ -75,3 +76,38 @@
onTotpEnable={(token) => auth.enableTotp(token)} onTotpEnable={(token) => auth.enableTotp(token)}
onTotpDisable={(token) => auth.disableTotp(token)} onTotpDisable={(token) => auth.disableTotp(token)}
/> />
<style>
/* The shared component library (header, page title box, dialogs, buttons, ...) otherwise
renders in its own generic default palette instead of this app's own branding - remap its
--sc-* tokens onto this app's own --color-* palette so every shared component follows suit.
--sc-secondary is a subtle tinted-surface color for low-emphasis buttons, a different role
than this app's own saturated --color-secondary, so it's derived instead of mapped directly. */
:global(.collabtable-shell) {
--sc-bg: var(--color-bg);
--sc-surface: var(--color-surface);
--sc-surface-raised: var(--color-surface);
--sc-surface-hover: var(--color-surface-hover);
--sc-border: var(--color-border);
--sc-border-strong: var(--color-border);
--sc-fg: var(--color-fg);
--sc-muted-fg: var(--color-muted-fg);
--sc-subtle-fg: var(--color-muted-fg);
--sc-primary: var(--color-primary);
--sc-primary-hover: var(--color-secondary);
--sc-primary-fg: var(--color-primary-fg);
--sc-secondary: color-mix(in srgb, var(--color-primary) 12%, var(--color-surface));
--sc-secondary-hover: color-mix(in srgb, var(--color-primary) 20%, var(--color-surface));
--sc-secondary-fg: var(--color-fg);
--sc-accent: var(--color-accent);
--sc-accent-fg: var(--color-accent-fg);
--sc-danger: var(--color-danger);
--sc-danger-hover: color-mix(in srgb, var(--color-danger) 90%, black);
--sc-danger-fg: var(--color-danger-fg);
--sc-success: var(--color-success);
--sc-success-fg: var(--color-success-fg);
--sc-warning: var(--color-warning);
--sc-warning-fg: var(--color-warning-fg);
--sc-ring: var(--color-ring);
}
</style>
+1 -1
View File
@@ -55,7 +55,7 @@
} }
</script> </script>
<div class="flex-1 p-4"> <div class="flex-1 px-4 pb-4">
<div class="mb-4 grid grid-cols-2 gap-3 sm:grid-cols-4"> <div class="mb-4 grid grid-cols-2 gap-3 sm:grid-cols-4">
<div class="rounded-lg border border-border bg-surface p-3"> <div class="rounded-lg border border-border bg-surface p-3">
<div class="text-xs text-muted-fg">Lists</div> <div class="text-xs text-muted-fg">Lists</div>
+1 -1
View File
@@ -28,7 +28,7 @@
const pageItems = $derived(listItems.slice((page - 1) * pageSize, (page - 1) * pageSize + pageSize)); const pageItems = $derived(listItems.slice((page - 1) * pageSize, (page - 1) * pageSize + pageSize));
</script> </script>
<div class="p-4"> <div class="px-4 pb-4">
<div class="mb-4 flex min-w-0 items-center gap-3"> <div class="mb-4 flex min-w-0 items-center gap-3">
<Button type="button" variant="secondary" size="sm" class="shrink-0" onclick={goBack}> <Button type="button" variant="secondary" size="sm" class="shrink-0" onclick={goBack}>
<ArrowLeft class="size-4" /> <ArrowLeft class="size-4" />