Implement Margin and fix Padding on Spices
Nobody has claimed this yet.
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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