DioxusLabs/taffy

Support `Display::FlowRoot`

Open

#484 opened on May 18, 2023

View on GitHub
 (2 comments) (0 reactions) (1 assignee)Rust (192 forks)github user discovery
good first issue

Repository metrics

Stars
 (3,189 stars)
PR merge metrics
 (PR metrics pending)

Description

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

display: flow-root nodes use the same algorithm as CSS Block layout, except that they force the creation of a new https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context. In practice the main impact of this will be to prevent margin collapsing between the Display::FlowRoot node and it's children, or through the Display::FlowRoot node. If in future we support floats, it would also affect those.

What solution would you like?

Implement support for Display::FlowRoot in Taffy, by adding a new variant to the Display enum and updating the Block Layout implementation to work with it.

Contributor guide