mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibWeb: Skip over floating elements when collapsing margins
Two sibling blocks are not vertically adjacent if one is float:left and the other is float:none. Respect this when collapsing margins.
This commit is contained in:
parent
62daa6f73c
commit
ba76a72422
Notes:
sideshowbarker
2024-07-19 05:22:08 +09:00
Author: https://github.com/awesomekling
Commit: ba76a72422
1 changed files with 1 additions and 1 deletions
|
@ -627,7 +627,7 @@ void LayoutBlock::place_block_level_non_replaced_element_in_normal_flow(LayoutBl
|
|||
|
||||
auto* relevant_sibling = block.previous_sibling();
|
||||
while (relevant_sibling != nullptr) {
|
||||
if (!relevant_sibling->is_absolutely_positioned())
|
||||
if (!relevant_sibling->is_absolutely_positioned() && !relevant_sibling->is_floating())
|
||||
break;
|
||||
relevant_sibling = relevant_sibling->previous_sibling();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue