mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 09:34:57 +09:00
LibWeb: Fix grid item placement when only grid-column-end is specified
This commit is contained in:
parent
4b3dccd0f2
commit
3781c132aa
Notes:
github-actions[bot]
2025-06-03 20:23:39 +00:00
Author: https://github.com/aplefull
Commit: 3781c132aa
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4969
3 changed files with 54 additions and 0 deletions
|
@ -351,6 +351,14 @@ GridFormattingContext::PlacementPosition GridFormattingContext::resolve_grid_pos
|
|||
}
|
||||
}
|
||||
|
||||
if (!placement_start.is_positioned() && placement_end.is_positioned() && !placement_end.is_span()) {
|
||||
if (result.span == 0)
|
||||
result.span = 1;
|
||||
result.start = result.end - result.span;
|
||||
if (result.start < 0)
|
||||
result.start = 0;
|
||||
}
|
||||
|
||||
if (placement_start.is_positioned() && placement_end.is_positioned()) {
|
||||
if (result.start > result.end)
|
||||
swap(result.start, result.end);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue