diff --git a/src/app.css b/src/app.css index 5a2ce65..b35d3e7 100644 --- a/src/app.css +++ b/src/app.css @@ -179,6 +179,7 @@ /* ---------- Small shared helpers ---------- */ .mono { font-family: var(--font-mono); } .wrap { max-width: 1100px; margin: 0 auto; padding: 0 32px; } +@media (max-width: 640px) { .wrap { padding: 0 16px; } } /* ---------- Docs content — global so styles reach mdsvex child components ---------- */ .content section { scroll-margin-top: 88px; padding-bottom: 8px; } @@ -200,6 +201,13 @@ .content li { font-size: 15px; line-height: 1.66; color: var(--muted); margin-bottom: 7px; } .content li::marker { color: var(--muted); } +/* Ordered lists (not the custom step list): hanging indent so a wrapped item — + e.g. a long code path that breaks mid-token — is indented under its first + line instead of returning to the margin. Needs an inside marker so the number + flows with the first line rather than sitting in the outside gutter. */ +.content ol:not(.steplist) { list-style-position: inside; padding-left: 0; } +.content ol:not(.steplist) > li { padding-left: 1.5rem; text-indent: -1.5rem; } + /* inline code — reaches markup inside mdsvex-rendered content */ .content code { font-family: var(--font-mono); @@ -208,6 +216,10 @@ color: var(--text); padding: 2px 6px; border-radius: 5px; + /* Break long tokens (file paths, flags) to stay inside the container, but only + as a last resort — so injected `` slash hints win and paths wrap on + segment boundaries. Table code opts back into `anywhere` (see .deftable). */ + overflow-wrap: break-word; } /* step list */ @@ -227,10 +239,11 @@ .steplist > li p { margin: 0; } /* definition / api table */ +.deftable-scroll { overflow-x: auto; margin: 0 0 18px; } .deftable { width: 100%; border-collapse: collapse; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; - margin: 0 0 18px; font-size: 14px; + margin: 0; font-size: 14px; } .deftable th { text-align: left; font-family: var(--font-mono); @@ -241,7 +254,10 @@ .deftable td { padding: 11px 14px; border-bottom: 1px solid var(--border); color: var(--muted); line-height: 1.5; vertical-align: top; } .deftable tr:last-child td { border-bottom: 0; } .deftable td:first-child { color: var(--text); } -.deftable code { white-space: nowrap; } +/* Table code wraps only on word / path-segment boundaries (spaces + injected + `` hints), never mid-token. A long command widens its column and the + .deftable-scroll wrapper scrolls, rather than breaking words apart. */ +.deftable code { overflow-wrap: normal; } .method { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 5px; diff --git a/src/lib/components/Hero.svelte b/src/lib/components/Hero.svelte index 3e2fd25..44d2891 100644 --- a/src/lib/components/Hero.svelte +++ b/src/lib/components/Hero.svelte @@ -112,7 +112,7 @@ .g1 { top: -160px; left: -120px; width: 460px; height: 460px; background: radial-gradient(circle, var(--ring), transparent 70%); } .g2 { bottom: -160px; right: -140px; width: 560px; height: 560px; background: radial-gradient(circle, color-mix(in srgb, var(--chart-1) 24%, transparent), transparent 70%); } - .inner { position: relative; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 48px; align-items: center; padding: 80px 32px 84px; } + .inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 48px; align-items: center; padding: 80px 32px 84px; } .eyebrow { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 22px; } .pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); } @@ -159,7 +159,8 @@ .donut .num b { font-size: 34px; font-weight: 800; color: var(--status-pass); letter-spacing: -0.02em; } .donut .num b i { font-size: 17px; font-style: normal; color: var(--chart-2); } .donut .num small { display: block; margin-top: 3px; font-size: 8.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); } - .ring-meta .rm-title { font-size: 13.5px; font-weight: 600; } + .ring-meta { min-width: 0; } + .ring-meta .rm-title { font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; } .ring-meta .rm-sub { font-size: 12px; color: var(--muted); margin-top: 3px; } .ring-meta .delta { margin-top: 10px; color: var(--status-pass); } @@ -184,7 +185,7 @@ @media (prefers-reduced-motion: reduce) { .cursor { animation: none; } .typer { transition: none; } } @media (max-width: 880px) { - .inner { grid-template-columns: 1fr; gap: 36px; padding-top: 56px; } + .inner { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-top: 56px; } .title { font-size: 52px; } } diff --git a/src/lib/components/Nav.svelte b/src/lib/components/Nav.svelte index 21ba64f..bfdbcec 100644 --- a/src/lib/components/Nav.svelte +++ b/src/lib/components/Nav.svelte @@ -12,13 +12,28 @@ ]; const isActive = (href: string) => href === '/docs' && $page.url.pathname.startsWith('/docs'); + + // Mobile menu: shown via the burger at the same width the inline links hide. + const MOBILE_BREAKPOINT = 760; + let menuOpen = $state(false); + + function onWindowKeydown(e: KeyboardEvent) { + if (e.key === 'Escape') menuOpen = false; + } + + function onWindowResize() { + // The burger is hidden above the breakpoint — don't leave the overlay stuck open. + if (window.innerWidth > MOBILE_BREAKPOINT) menuOpen = false; + } -