mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 06:09:08 +00:00
LibWeb: Fix inside list style overriding content offset
Previously, if a horizontal margin was set on a list-item and it was list-style-position: inside, it would effectively remove that margin.
This commit is contained in:
parent
b272bb3373
commit
60fd406903
Notes:
github-actions[bot]
2025-03-27 23:11:11 +00:00
Author: https://github.com/CanadaHonk
Commit: 60fd406903
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4130
Reviewed-by: https://github.com/gmta ✅
3 changed files with 25 additions and 1 deletions
|
@ -1233,7 +1233,7 @@ void BlockFormattingContext::layout_list_item_marker(ListItemBox const& list_ite
|
|||
auto final_marker_width = marker_state.content_width() + default_marker_width;
|
||||
|
||||
if (marker.list_style_position() == CSS::ListStylePosition::Inside) {
|
||||
list_item_state.set_content_offset({ final_marker_width, list_item_state.offset.y() });
|
||||
list_item_state.set_content_x(list_item_state.offset.x() + final_marker_width);
|
||||
list_item_state.set_content_width(list_item_state.content_width() - final_marker_width);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue