LibWeb: Repeat grid track sizing with minmax where both are not definite

...should be treated as invalid value.
This commit is contained in:
Aliaksandr Kalenik 2025-03-24 23:10:39 +00:00 committed by Alexander Kalenik
parent 88e11eea2d
commit 090ac66af1
Notes: github-actions[bot] 2025-03-25 09:53:57 +00:00
3 changed files with 30 additions and 0 deletions

View file

@ -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();