mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 13:06:00 +03:00
[PR #619] [MERGED] Add marginX/marginY and paddingX/paddingY to the style attributes #1446
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#1446
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/anomalyco/opentui/pull/619
Author: @viralcodex
Created: 2/2/2026
Status: ✅ Merged
Merged: 2/4/2026
Merged by: @simonklee
Base:
main← Head:padding-and-margin-X-and-Y📝 Commits (5)
21ba87cAdd marginX/marginY and paddingX/paddingY settersdec9944Merge branch 'main' into padding-and-margin-X-and-Y2e58b04Add axis-specific padding and margin examples6ab387eMerge branch 'main' into padding-and-margin-X-and-Y3a4383dprettier📊 Changes
3 files changed (+172 additions, -0 deletions)
View changed files
📝
packages/core/src/Renderable.ts(+52 -0)📝
packages/core/src/tests/yoga-setters.test.ts(+114 -0)📝
packages/web/src/content/docs/core-concepts/layout.mdx(+6 -0)📄 Description
Fixes: #618
Hi team,
Here's a small change that I have added.
X and Y attributes for both padding and margin just to make writing these values a little easier.
This is my first PR on this project and I am using this project for my own CLI tool I am building.
We can discuss and see if it fits with the project requirements.
But from a Dev experience point of view, I felt like I should add it to make it better, Also this aligns with people accustomed to tailwindCSS as well.
Here's a small demo:
https://github.com/user-attachments/assets/42d04e53-2006-435e-8e59-ef7d641ffe2f
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.