Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First pass at a DOM Box implementation #1981

Draft
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

dellisd
Copy link
Collaborator

@dellisd dellisd commented Apr 18, 2024

I'm opening this PR primarily to get some feedback before trying to complete the implementation.

This sort of works by giving the children of the box (a flex container) absolute positioning. The alignment modifiers (start, end, center) work as expected with the children overlapping. stretch on the other hand does not work!

One way I thought to get around this limitation is to have the Box set the width/height of its children to 100% if a stretch alignment is requested, but this could end up interacting poorly with sizing modifiers if the order of operations isn't controlled carefully.


  • CHANGELOG.md's "Unreleased" section has been updated, if applicable.

Does not support stretch alignments
Copy link
Collaborator

@JakeWharton JakeWharton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To get 100% of the features we may need to do JS-based layout rather than relying solely on CSS. There's probably not any choice, really, since behaviors like stretch rely on knowing the size along each axes of the other elements.

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.

2 participants