8000 fix(site): responsive landing page + dark theme by dmux · Pull Request #9 · dmux/minilake · GitHub
[go: up one dir, main page]

Skip to content

fix(site): responsive landing page + dark theme - #9

Merged
dmux merged 1 commit into
mainfrom
fix/site-responsive-and-theme
Aug 20, 2026
Merged

dmux merged 1 commit into
mainfrom
fix/site-responsive-and-theme

Conversation

@dmux
@dmux dmux commented Aug 20, 2026
Copy link
Copy Markdown
Owner

The landing page scrolled sideways on every phone width, and had no dark mode. Both are fixed here; the light design is unchanged apart from one contrast nudge noted below.

Responsiveness

At a 375px viewport the document was 624px wide. Three causes:

  • 1fr in the single-column fallbacks. 1fr is minmax(auto,1fr), so a grid item refuses to shrink below the min-content of a nowrap command line or a <pre>. Every fallback now uses minmax(0,1fr) — the base rules already did.
  • Grids with no explicit template (.install, .checks, .ftr ul) sized their implicit auto track to max-content, pushing the Copy buttons off-screen (hidden by .hero's overflow:hidden, so it read as "the button is missing", not as a scroll).
  • <img width="360" height="360"> with only a CSS width, so the logo rendered stretched 150×360 instead of square. Fixed on the base img rule.

Also:

  • The nav needs ~920px for brand + 5 links + 2 buttons, but only collapsed at 720px — at 768px it overflowed by 60px. It now collapses at 960px, on its own measurement rather than the layout's.
  • The coverage table becomes stacked cards below 720px instead of a 680px side-scroller where only the service name was visible.
  • Mobile polish: type scale, hero logo size, full-width hero/CTA buttons, two-column footer, tighter gutters and paddings, and an icon-only GitHub button below 460px so the bar still fits at 320px.

Dark theme

  • Colours are tokens on :root; dark redefines only what changes, in two places that must stay in sync: @media (prefers-color-scheme:dark) (guarded so an explicit light choice wins — the only rule that applies without JS) and [data-theme="dark"], which the toggle sets.
  • A script in <head> stamps data-theme before the first paint, so switching never flashes. The choice persists in localStorage (minilake-theme); with nothing stored, the OS leads and live prefers-color-scheme changes are followed.
  • Sun/moon toggle in the nav, with an aria-label that tracks state.

Two things needed decoupling:

  • The primary button got its own --btn-top/--btn-bottom pair: --blue must go light in dark mode for link legibility, and white text on light blue is 1.8:1.
  • --navy was overloaded as both text and background colour. It is now the heading token (light in dark mode); the places that need the literal brand navy — the white button on navy panels, the active tab — use --brand-navy/--tab-on.

The architecture diagram had its styles inside <svg><style>, which is document-global and followed no theme. They moved to the main stylesheet under .arch svg, as tokens.

Verification

  • Overflow sweep across 300 → 1440px: no horizontal overflow at any width.
  • WCAG contrast audit in both themes: no failures. The only change to the light palette is --text-faint #7D8CA5 → #6B7B94, which lifts the small uppercase labels from 3.2:1 to 4.3:1 — a one-line revert if you prefer the original tone.
  • Toggle, persistence across reload, mobile menu and no console errors checked in the browser.

site/README.md documents the token contract so future edits stay themable.

The page scrolled sideways at every phone width. Three causes:

- `1fr` in the single-column fallbacks is `minmax(auto,1fr)`, so a grid item
  refused to shrink below the min-content of a nowrap command line or a <pre>:
  at a 375px viewport the document was 624px wide. Every fallback now uses
  minmax(0,1fr).
- Grids with no explicit template (.install, .checks, .ftr ul) sized their
  implicit auto track to max-content, pushing the Copy buttons off-screen.
- The logo carried width/height attributes but only a CSS width, so it
  rendered stretched to 150x360 instead of square.

The nav also collapsed too late: the full bar needs ~920px but only became a
burger at 720px, overflowing by 60px at tablet width. It now collapses at
960px, and the coverage table stacks into cards below 720px rather than being
a 680px side-scroller.

Dark mode ships alongside. Colours are tokens on :root; dark redefines only
what changes, in @media (prefers-color-scheme:dark) and [data-theme="dark"],
and a head script stamps the theme before the first paint so nothing flashes.
The choice persists in localStorage; without one the OS leads. The primary
button keeps its own colour pair because --blue has to go light in dark mode
for link legibility, and white text cannot sit on that.

Verified from 300px to 1440px with no horizontal overflow, and with no WCAG
contrast failures in either theme.
@dmux dmux self-assigned this Aug 20, 2026
@dmux dmux added the documentation Improvements or additions to documentation label Aug 20, 2026
@dmux
dmux merged commit e391b7d into main Aug 20, 2026
3 checks passed
@dmux
dmux deleted the fix/site-responsive-and-theme branch September 30, 2026 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0