Skip to content

fix(docs): make the landing stylesheets direction-aware (#146) - #282

Merged
jeiel85 merged 1 commit into
mainfrom
claude/rtl-country-readme-landing-fc7d1f
Jul 26, 2026
Merged

fix(docs): make the landing stylesheets direction-aware (#146)#282
jeiel85 merged 1 commit into
mainfrom
claude/rtl-country-readme-landing-fc7d1f

Conversation

@jeiel85

@jeiel85 jeiel85 commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Markleaf has laid out right-to-left note content correctly since v2.28.0 (#146). The site around it never had to: both stylesheets are written in physical directions, so a dir="rtl" page would break in ways that have nothing to do with translation.

What changes

Physical offsets become logical ones — no-ops under LTR, correct under RTL:

where was now
.skip-link, .file-receipt left inset-inline-start
.file-receipt, .proof-item + .proof-item border-left border-inline-start
.feature-points li, .hero-product > figcaption, .content ul padding-left padding-inline-start
.feature-points li::before left: 0 inset-inline-start: 0
.file-browser-bar strong margin-left margin-inline-start
.channel-row em text-align: right / left text-align: end / start

Three things direction alone does not carry get [dir="rtl"] rules: an Arabic-script system font stack (no webfont is fetched — the pages still request nothing external), letter-spacing: normal in place of the negative Latin display tracking, and a mirrored hover nudge for .channel-row with its :active reset, since translateX has no logical form.

No page content changes. The six landing pages, six privacy pages and six READMEs are untouched.

Verification

  • LTR unchanged. Every element on 14 pages measured at 320 / 360 / 768 / 1280 px, old CSS against new: the twelve real pages are box-identical. The only computed-style difference anywhere is text-align reporting start instead of left on three .channel-row em — the same rendering.
  • RTL mirrors. Throwaway dir="rtl" copies of index.html and privacy.html move 20 elements and pick up the new stack; screenshots confirm it — the file-receipt card and its green accent border swap to the inline-start edge, matching the LTR layout mirrored.
  • No overflow. scripts/check-landing-overflow.mjs passes 14 pages x 6 widths with both probes included, 320px floor included.

Pixel diffing was tried first and dropped: the animated tablet GIFs and the loading="lazy" webps make the same tree screenshot differently twice, producing four to nine phantom regressions per run.

Gate

landing-check only fired on docs/**.html, so a stylesheet change — the one most able to overflow a page — could reach main untested. docs/**.css joins both path filters, which is what puts this PR through the gate.

🤖 Generated with Claude Code

Markleaf lays out right-to-left note content correctly since v2.28.0, but
the site around it was written in physical directions: `left` on the skip
link and the file-receipt card, `border-left` on the trust-ledger
dividers, `padding-left` on the feature-point bullets and their dash,
`text-align: right` on the channel-row status. Each of those is identical
under LTR and visibly broken under RTL.

Swap them for logical properties, and add `[dir="rtl"]` rules for the
three things direction alone does not carry: an Arabic-script system font
stack (no webfont is fetched, the pages still request nothing), normal
letter-spacing in place of the negative Latin display tracking, and a
mirrored hover nudge with its :active reset.

No page changes here - the six landing pages, six privacy pages and six
READMEs are untouched. Measuring every element on 14 pages at four widths,
old CSS against new, the real pages come out box-identical; the only
computed-style difference anywhere is `text-align` reporting `start`
instead of `left`. A throwaway dir="rtl" copy of index.html and
privacy.html mirrors correctly and clears the overflow gate at 320px.

That gate only fired on `docs/**.html`, so a stylesheet change - the one
most able to overflow a page - could reach main untested. `docs/**.css`
joins both path filters.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@jeiel85
jeiel85 merged commit 0e81463 into main Jul 26, 2026
6 checks passed
jeiel85 added a commit that referenced this pull request Jul 27, 2026
Codex review flagged the missing documentation record. AGENTS.md keeps a
work-unit entry in HISTORY.md for every change, and PR #282 — a docs-only
landing and README change — set the precedent.

The same review also asked for a CHANGELOG entry. That half does not apply:
CHANGELOG.md is strictly version-sectioned and is the source the release job's
awk parser cuts GitHub release notes from, it has no Unreleased section, and
this change carries no version bump, so an entry would mean inventing a version
or editing v2.32.1's already-published notes. Nothing about the app changed.
The HISTORY entry records that reasoning.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant