这是indexloc提供的服务,不要输入任何密码
Skip to content

compute config for mimicking (implementing) constraints layout / auto layout / css anchor #879

@softmarshmallow

Description

@softmarshmallow

What problem does this solve or what need does it fill?

This is related to plain old "centering a div" prblem in box model.

Image

Say, for android constraint layout, you effectively set both left + width + right to fix thing in center (ish),
but in css, this would make either left or right to win based on writing direction.

What solution would you like?

While this is non-css standards, I think this behaviour could be achieved quite easly.
We could consider introducing new style struct or new field, but instead, just perhpas introducing new 3rd parameter for controlling this behaviour?

What alternative(s) have you considered?

We usually would use flexbox for this situation, but that would require tidious tree re-construction just for that.

This is not a full proposal for supporting constraint / auto layout, but rather consider exposing the control of the behaviour how inset resolving works within the current implementation.

Additional context

Screen.Recording.2025-10-20.at.3.08.29.PM.mov
Screen.Recording.2025-10-20.at.3.26.29.PM.mov

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions