Repository navigation
Conversation
A browser test over the Read tool fixture: in a line-numbered Pygments block, the number column and the code column must span the same height and start at the same top, in classic and in minimal. Classic passes; minimal fails by 11px over 20 lines (#364). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
In a line-numbered Pygments block the number column is a bare <pre>,
the code column a <pre><code>. The shared sheet's `code { line-height:
1.5 }` reached that <code>, while the minimal theme gives both <pre>s
1.55 — so the numbers outran the code by half a pixel a line, a whole
line every thirty. Classic has 1.5 on both and never showed it.
The minimal `pre code` reset now inherits the line height too. Minimal
CSS only: the classic page and the shared sheets are untouched, and the
three regenerated snapshots are the minimal ones, additive.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. WalkthroughThe minimal theme now inherits line height for code inside transcript Changes: Pygments Line Alignment
Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Low Possibly related PRs
Suggested reviewers: Merge Risk:
|
Fixes #364.
In the minimal theme, the line-number column of a Pygments block drifted away from its code: over 20 lines the gutter was 11 px taller, so a number sat a line below its code by the end of a long block. Classic was fine.
Cause. Pygments wraps the code column in
<pre><code>, and the number column in a bare<pre>. The sharedcode { line-height: 1.5 }reached the code column, while the minimal theme's.content prerule setsfont: 0.78em/1.55on both<pre>elements. The two columns rendered at 16.38 px and 16.93 px per line, 0.55 px of drift per line. Classic has 1.5 on both sides and never showed it.Fix. One declaration in the minimal theme's
layout.css:pre code { line-height: inherit }, so the code column follows its<pre>. The selector covers every<pre><code>in a minimal transcript, not only line-numbered blocks: Markdown fences and Pygments blocks without numbers now follow the<pre>'s 1.55 too, about 3 % taller than before, which is what the theme'sprerule intended.Classic is untouched. No shared sheet or template changed; before/after screenshots of the same block in classic are byte-identical. The three regenerated minimal snapshots are +15/-0, all inside
<style>.Test. A browser test, parametrised over both themes, renders a 20-line line-numbered block and checks the two columns span the same height from the same top. Red on minimal before the fix (338.4 px vs 327.5 px), green on classic throughout, and red again when the declaration is removed.
🤖 Generated with Claude Code
Summary by CodeRabbit