feat: typography & CSS polish (#42) #43
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/pal-e-api!43
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "42-feat-typography-css-polish-phase-4-brows"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
base.htmlChanges
src/pal_e_docs/templates/base.html:<link>with preconnect for Atkinson Hyperlegible (400, 700 weights).note-content tablestyling: border-collapse, subtle borders (#e0e0e0), cell padding, bold header row with #f6f8fa background, alternating row colors (#f9f9f9),display: block; overflow-x: autofor mobile scroll.note-content prestyling: background (#f6f8fa), padding (1rem), border-radius (6px), overflow-x: auto.note-content pre codereset: removes background/padding so inline code styling doesn't double up inside pre blockspre.mermaidto explicitly reset padding and border-radius to 0 (prevents inheriting new pre styling).note-content h3(1.1rem) and.note-content h4(1rem) with appropriate marginsflex-wrap: wrapandgap: 0.5rem 1.5remto nav for mobile wrappingTest Plan
PALDOCS_DATABASE_PATH=:memory: python -m pytest)Review Checklist
Related Notes
plan-2026-02-26-browse-frontend-polish— Phase 4: Typography & CSS polish (final phase)QA Review — PR #43: Typography & CSS Polish
Summary: APPROVE — Clean, focused CSS-only change. All acceptance criteria met. One non-blocking suggestion below.
Issues (blocking)
None.
Suggestions (non-blocking)
1.
display: blockon table changes layout semanticsdisplay: blockon a<table>disables the table layout algorithm — columns no longer auto-distribute width. This is a known pragmatic pattern for making tables horizontally scrollable without a wrapper<div>, and it works. Butwidth: 100%is slightly misleading here because the table as a block element will always be 100% width of its parent — internal content scrolls viaoverflow-x, but the table never shrinks to fit narrow content.In practice this works fine for a docs site. But if any table has very few/narrow columns, it'll stretch to full width unnecessarily. Not a real problem today, but worth a code comment:
Take it or leave it — the behavior is correct for this use case.
2.
tr:nth-child(even)includes<thead>rows if presentIf any note content uses
<thead>, the header row counts towardnth-childnumbering. Sincethhas its ownbackground: #f6f8fathis won't cause visual issues (thethbackground overrides the alternating color). But the alternating pattern may shift by one row between tables with and without<thead>. For a docs site with agent-authored content, this is cosmetic only and not worth over-engineering (e.g.,tbody tr:nth-child(even)would only work if notes actually use<tbody>tags, which they likely don't).Looks Good
Font setup is textbook. Preconnect hints for both Google Fonts domains,
display=swapprevents FOIT, all four weight/style variants (400, 700, italic 400, italic 700) included. System stack as fallback is clean.Mermaid override is correct.
.note-content pre(specificity 0,1,1) at line 112 vspre.mermaid(specificity 0,1,1) at line 160 — same specificity, later rule wins. The PR explicitly addspadding: 0andborder-radius: 0topre.mermaidto cover the new properties introduced by.note-content pre. Comment updated to "override .note-content pre styling" makes the intent clear. No regression possible.pre codereset is thorough. Resetsbackground,padding,border-radius, andfont-size— covers all four properties from.note-content codethat would otherwise double up inside pre blocks.font-size: inheritis the right call (inherits frompre, not from thecoderule's0.9em).Nav mobile wrapping.
flex-wrap: wrap+gap: 0.5rem 1.5rem(row gap, column gap) is the right approach. The auth controls in the inline<span style="margin-left: auto">will push to a new row on narrow screens while maintaining right-alignment on wide screens.Heading hierarchy.
h3at 1.1rem andh4at 1rem with appropriate top margins create clear visual hierarchy below the existingh2at 1.25rem. The margins are reasonable — top-heavy to create separation from preceding content.Scope discipline. Only
base.htmlmodified. No changes to mermaid JS, lightbox JS, auto-link CSS, Jinja2 template blocks, or HTML structure. Font link in<head>is the only structural HTML addition. Exactly what Phase 4 called for.No accessibility concerns. Atkinson Hyperlegible was designed specifically for readability/accessibility. Color contrast ratios are maintained (existing palette unchanged). Font sizes are reasonable (nothing below 0.75rem except badges which are decorative).
Verdict: Ship it. This is a clean, well-scoped CSS polish pass. The single file change, thorough pre/mermaid override handling, and restraint (no scope creep) are exactly right for a final polish phase.