leostera / leostera/minttea

Implement Margin and fix Padding on Spices

Open
#4 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue help wanted
Dominant language
OCaml
Stars
472
Forks
32
PR merge metrics
No merged PRs in 30d

Description

At the moment the padding_* properties are happening after the styles are applied to the text, which means padding doesn't behave like you'd expect it to. If you add padding to something with background, the padded space doesn't have the background.

In the Spices.do_render private function there's a section where we're handling the padding, that would become about margin_* instead:

https://github.com/leostera/minttea/blob/main/spices/spices.ml#L120-L124

And then similar code for padding would be added earlier on that function, where we do the core rendering of the string.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open spices/spices.ml and inspect the Spices.do_render section linked at lines 120-124. Trace the existing padding handling, move that behavior to margin handling there, and inspect the earlier core string-rendering path for the corresponding padding logic. Done means padding receives the background styling while margin remains handled separately.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
cli
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.