staging-org / ocean-landing-serve / CLAUDE.md

ocean-landing

SvelteKit + Tailwind v4 + shadcn-svelte landing page for Sailfork, with a full-screen ASCII ocean hero. bun only.

Important rules

  • this is just a ui project not a real project so make sure to not create a backend or servies that are not needed only
  • make sure to not write a test and lot of command run just do the actual development thing
  • No variants. Build one version of each screen or component and ship it: no /variants page, no side-by-side comparisons, no alternate components kept around for comparison. This overrides any global instruction to build 2-3 variants. bun run check:ui fails if src/routes/variants exists.

UI rules

Read docs/ui-rules.md before touching any UI: typography, color, layout, motion, the ASCII ocean, or copy. Text is set only with the type-* utilities in src/routes/layout.css.

Building or changing an app screen (src/routes/(app)): follow docs/app-screens.md for the steps, the patterns that replace rejected defaults, and the browser proof.

Verify

bun run check && bun run check:ui && bun run build

Gotchas

  • A sticky header inside a padded scroll pane sticks below the padding; offset it by the padding (-top-8 under py-8).
  • Chrome lists some time zones under old ids (Asia/Calcutta, Europe/Kiev). Compare zones through canonical() in src/lib/time-zones.ts, never by string.
  • SvelteKit 3 goto takes replace and reset: false; noScroll and keepFocus are gone and throw. On links, data-sveltekit-noscroll is replaced by data-sveltekit-reset="false".
  • New routes need a dev server restart before their CSS renders on the server.
  • Never animate the app sidebar's width: it re-lays out the whole page every frame and drops frames on heavy pages (profile skyline, code). Panes.animateSidebar in (app)/+layout.svelte snaps the width once and animates a transform plus clip (FLIP); the strip at the page's left edge keeps the edge and header rule continuous while it slides.
  • Every app scroll container (overflow-y-auto panes in the shell) needs relative. Without it, sr-only labels and radios (absolutely positioned) inside it lay out against the document, make the whole page scroll, and push the shell off screen. bun run check:ui enforces it.