Skip to content

Outside line-number border looks completely horrible #139

Description

@GeronimoCastano

Description

With Codly 1.3.1, a bordered code block with number-placement: "outside" has a square left border and rounded right corners, which looks asymmetrical and weird. The same block with number-placement: "inside" has a symmetric rounded border.

Reproduction

#import "@preview/codly:1.3.1": *

#show: codly-init
#codly(
  number-format: numbering.with("1"),
  number-placement: "outside",
  display-icon: false,
  display-name: false,
  radius: 20pt,
  inset: 10pt,
  fill: rgb("#b8f2e6"),
  zebra-fill: rgb("#ffd166"),
  stroke: 3pt + rgb("#0066ff"),
  lang-stroke: none,
)

```text
print("line 1")
print("line 2")
print("line 3")
print("line 4")
```

Changing number-placement to "inside" produces the symmetric result shown in the comparison below.

Expected

The outside-number border should follow the same rounded geometry as the code fill, with a consistent radius and stroke width on both sides.

Actual

The outside-number border looks completely wrong, asymmetrical and overall does not follow the block fill shape.

Released Codly border comparison

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions