Skip to content

Implement horizontal margins in the layout engine - #187

Draft
afishhh wants to merge 4 commits into
masterfrom
horizontal-margins
Draft

Implement horizontal margins in the layout engine#187
afishhh wants to merge 4 commits into
masterfrom
horizontal-margins

Conversation

@afishhh

@afishhh afishhh commented Jul 20, 2026

Copy link
Copy Markdown
Owner

This block sizing refactoring is essentially necessary anyway if we want to do anything useful with our block layout.

Vertical margins are not implemented because margin collapsing is actually messed up and evil (we can do without it for now).

Part of trying to expose a layout API to users, not used internally.

afishhh added 3 commits July 20, 2026 21:25
Make final inline layout operate on differently-typed items.
This allows us to re-use the shaped items for multiple layout attempts
and means new information can be added to items before layout without
needing to assert its presence later.
@afishhh
afishhh force-pushed the horizontal-margins branch from 03171b2 to 0bb9f71 Compare July 20, 2026 19:29
@afishhh

afishhh commented Jul 27, 2026

Copy link
Copy Markdown
Owner Author

This structure is a bit more accurate to the box model and css sizing but it's still not good enough to neatly handle additional inner layout algorithms (eg. flexbox).
I have to do some more thinking about how to best handle this.

@afishhh
afishhh marked this pull request as draft July 27, 2026 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant