Fix #167: blank gutter rows match mobile code line height #201

Closed
fen wants to merge 1 commits from fix-167-r3 into dev
Collaborator

Follow-up to the already-merged #167 fixes (PRs #190/#192/#193 + remote fix-167 2149fcc).

The mobile media query overrides .code font-size to 13px but left the gutter rows at the desktop metric, so on narrow viewports blank gutter rows stacked taller than code rows and every number drifted off its wrapped line start.

  • Blank gutter rows now take an explicit height matching the code line-height: calc(var(--code-fs) * var(--code-lh)) on desktop, calc(13px * 1.7) under the 640px media query.

Verified in headless chromium (stdlib CDP) at 375x812 and 1200x900:

  • wrapped long lines: gutter count == visual row count, numbers 1..n at each line start, per-row alignment < 2px, no horizontal scroll
  • wrap off / toggle on+off / short paste: unchanged behavior
Follow-up to the already-merged #167 fixes (PRs #190/#192/#193 + remote fix-167 2149fcc). The mobile media query overrides `.code` font-size to 13px but left the gutter rows at the desktop metric, so on narrow viewports blank gutter rows stacked taller than code rows and every number drifted off its wrapped line start. - Blank gutter rows now take an explicit height matching the code line-height: `calc(var(--code-fs) * var(--code-lh))` on desktop, `calc(13px * 1.7)` under the 640px media query. Verified in headless chromium (stdlib CDP) at 375x812 and 1200x900: - wrapped long lines: gutter count == visual row count, numbers 1..n at each line start, per-row alignment < 2px, no horizontal scroll - wrap off / toggle on+off / short paste: unchanged behavior
fen added 1 commit 2026-09-10 17:12:27 +00:00
Fix #167: mobile gutter row height follows mobile code font-size
CI / docker (pull_request) Skipped
CI / test (pull_request) Successful in 45s
9d87211eda
The mobile media query overrides .code font-size to 13px, so the blank
gutter row height must match (13px x 1.7), not the desktop metric.
fen closed this pull request 2026-09-10 17:13:20 +00:00

Pull request closed

This pull request cannot be reopened because the branch was deleted.
Sign in to join this conversation.