Skip to content

💡 Border style variety (named styles + custom charset) #79

Description

@natemoo-re

Is your feature request related to a problem?

We can only draw one style of border. The renderer hardcodes every glyph—corners ┌┐└┘, horizontals , verticals . When cornerRadius > 0, the corners are swapped for ╭╮╰╯ .

Describe the solution you'd like

Callers should be able to pick from CSS border-style (to the extent possible), and potentially custom glyphs.

"double" would select ╔╗╚╝ / / ; a custom object maps each position (topLeft, top, topRight, right, bottomRight, bottom, bottomLeft, left) to a string drawn verbatim:

const border = {
  color: rgba(255, 255, 255),
  left: 1,
  right: 1,
  top: 1,
  bottom: 1,
  charset: "double", // or others
};

Describe alternatives you've considered

Drop our border and paint the box as raw text cells, which loses the layout engine's border reservation, junction handling, and per-side widths—reimplementing the border renderer in user space.

Additional context

Failing test case on nm/repro/border-styles (test · diff); charset is dropped today, so single-line glyphs render regardless. The change likely lives in render_border at src/clayterm.c:300 and the cornerRadius-keyed ternaries at src/clayterm.c:310-313, with the wire format threading a style/glyph field through ops.ts:256, ops.ts:138-149, and the PROP_BORDER decode at src/clayterm.c:530-537.

Implementation is in progress on feat/border-style and may be closed by its PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions