Skip to content

Fix rounded fills with outside line numbers - #138

Open
GeronimoCastano wants to merge 6 commits into
Dherse:mainfrom
GeronimoCastano:fix/issue-134-rounded-corners
Open

Fix rounded fills with outside line numbers#138
GeronimoCastano wants to merge 6 commits into
Dherse:mainfrom
GeronimoCastano:fix/issue-134-rounded-corners

Conversation

@GeronimoCastano

@GeronimoCastano GeronimoCastano commented Aug 25, 2026

Copy link
Copy Markdown

Closes #134

When line numbers sit outside the code grid, the code fills no longer reach the rounded left edge of the block. The first draft clipped only the first and last rows, which made the left radius depend on the row height. This revision draws outside fills in one rounded container aligned to the code column, matching the whole-block clipping used by inside numbering. The existing stroke behavior is unchanged.

Comparison

The comparison uses the released upstream behavior for Before and this branch's whole-block clipping for After. Both examples use four code lines, radius: 20pt, number-placement: "outside", and contrasting zebra fills.

Before After
Before After

Tests:

  • typst compile --root . tests/number-placement/test.typ /tmp/codly-issue-134-whole-clip-test.pdf
  • git diff --check

@GeronimoCastano
GeronimoCastano marked this pull request as draft August 25, 2026 16:44
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.

Rounded corners disappear when number-placement is set to outside

1 participant