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

Horizontal auto layout incorrect #386

Open
elff1 opened this issue Jun 14, 2024 · 1 comment
Open

Horizontal auto layout incorrect #386

elff1 opened this issue Jun 14, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@elff1
Copy link
Member

elff1 commented Jun 14, 2024

Detailed description

The file contains four frames, each with two parts in horizontal auto layout.
bug_autolayout.zip

Expected behavior

The left and right parts of all four frames should have equal width.
frame3ok

Actual behavior

Only one frame has equal width, while the other three do not.
frame3

Steps to reproduce

No response

Additional information

No response

@elff1 elff1 added the bug Something isn't working label Jun 14, 2024
@gaimanjing
Copy link
Member

gaimanjing commented Jul 3, 2024

bug.zip is a simplified file.
The width attribute of these two nodes in figma is to Fill container. Vgg uses the CSS flex model for layout and uses flex-grow to express this attribute value. The calculation result will add the width of the node itself.

vgg layout spec: https://docs.verygoodgraphics.com/specs/layout/flexbox-item#flexbasis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants