mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
LibWeb: Repeat grid track sizing with minmax where both are not definite
...should be treated as invalid value.
This commit is contained in:
parent
88e11eea2d
commit
090ac66af1
Notes:
github-actions[bot]
2025-03-25 09:53:57 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 090ac66af1
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4078
3 changed files with 30 additions and 0 deletions
|
@ -3100,6 +3100,12 @@ Optional<CSS::GridRepeat> Parser::parse_repeat(Vector<ComponentValue> const& com
|
|||
&& (track_sizing_function.value().grid_size().is_flexible_length() || token.is_ident("auto"sv))
|
||||
&& (is_auto_fill || is_auto_fit))
|
||||
return {};
|
||||
if ((is_auto_fill || is_auto_fit) && track_sizing_function->is_minmax()) {
|
||||
auto const& minmax = track_sizing_function->minmax();
|
||||
if (!minmax.min_grid_size().is_definite() && !minmax.max_grid_size().is_definite()) {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
repeat_params.append(track_sizing_function.value());
|
||||
part_two_tokens.discard_whitespace();
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
||||
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
|
||||
BlockContainer <body> at (8,8) content-size 784x208 children: not-inline
|
||||
Box <div.grid> at (8,8) content-size 784x208 [GFC] children: not-inline
|
||||
BlockContainer <div.item> at (10,10) content-size 780x100 [BFC] children: not-inline
|
||||
BlockContainer <div.item> at (10,114) content-size 780x100 [BFC] children: not-inline
|
||||
|
||||
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
||||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x600]
|
||||
PaintableWithLines (BlockContainer<BODY>) [8,8 784x208]
|
||||
PaintableBox (Box<DIV>.grid) [8,8 784x208]
|
||||
PaintableWithLines (BlockContainer<DIV>.item) [8,8 784x104]
|
||||
PaintableWithLines (BlockContainer<DIV>.item) [8,112 784x104]
|
|
@ -0,0 +1,11 @@
|
|||
<style>
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(min-content, 1fr)); /* Invalid CSS value */
|
||||
}
|
||||
.item {
|
||||
background-color: magenta;
|
||||
border: 2px solid cyan;
|
||||
height: 100px;
|
||||
}
|
||||
</style><div class="grid"><div class="item"></div><div class="item"></div></div>
|
Loading…
Add table
Add a link
Reference in a new issue