Skip to content

Incorrect grid content size computation #954

@notdanilo

Description

@notdanilo

taffy version

Commit hash: d803b72

Platform

Windows

What you did

Created two failing tests:

https://github.com/notdanilo/taffy/blob/main/tests/grid_empty_track.rs
https://github.com/notdanilo/taffy/blob/main/tests/grid_scroll.rs

What went wrong

The first test grid_content_size_empty_track explicitly set the scrollable area to be 500.0, but it was only seeing the item, which is 50.0.
The second grid_content_size_overflow test shows that stacked items weren't computed correctly. The computation was only reporting 100px, the size of one item. Every grid computation was ignoring its position when subtracting the grid position, resulting in a wrong computation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions