Skip to content

Conversation

@Lutetium-Vanadium
Copy link
Contributor

Objective

Fixes #876.

Context

From comparing the debug logs between having the container absolute vs in-flow, I noticed that the final_layout_pass was getting no known parent width for absolute but not for in-flow.

Feedback wanted

  • I'm not super familiar with the CSS spec so I'm not sure if this is correct or there is some state that needs to be corrected at a different time.
  • I think there might be a way to remove the duplicate computation by changing the node_inner_size after determine_container_cross_size, but again not familiar with the CSS spec and its under constants so I didn't change it.

@alice-i-cecile alice-i-cecile added the bug Something isn't working label Oct 18, 2025
Copy link
Collaborator

@nicoburns nicoburns left a comment

Choose a reason for hiding this comment

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

Hello, and thanks for the PR!

The core idea here looks correct to me (and the Flexbox test backs that up). A couple of comments:

  • I notice you've modified both Flexbox and Block layout, but there is only a test for Flexbox layout. Could you add a test for Block layout too please?
  • Relatedly, Grid layout doesn't have either a test or a fix. Could get a test for Grid layout (and if the test reveals it requires the fix, also the fix)

@Lutetium-Vanadium
Copy link
Contributor Author

Hi, thanks for the feedback. I added the changes you requested. Hope the grid implementation is correct

Copy link
Collaborator

@nicoburns nicoburns left a comment

Choose a reason for hiding this comment

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

Looks good now - thanks!

@nicoburns nicoburns merged commit f99b57f into DioxusLabs:main Oct 20, 2025
26 checks passed
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

Successfully merging this pull request may close these issues.

Wrong size for width 100% when parent is absolute

3 participants