mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-04 09:22:53 +00:00
LibWeb/CSS: Fix linear-gradient single color-stop usage
The Web::CSS::Parser's GradientParsing ignores color-stops if it is only a single one. This change allows to have color-stops with double positions against a single color. Further, also allows for `linear-gradient(black)` and similar other gradient functions
This commit is contained in:
parent
4fa372564d
commit
cfe6702767
Notes:
github-actions[bot]
2025-02-03 17:25:19 +00:00
Author: https://github.com/mehrankamal 🔰
Commit: cfe6702767
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3405
Reviewed-by: https://github.com/AtkinsSJ ✅
12 changed files with 459 additions and 7 deletions
|
@ -75,9 +75,6 @@ Optional<Vector<TElement>> Parser::parse_color_stop_list(TokenStream<ComponentVa
|
|||
if (parse_color_stop_list_element(first_element) != ElementType::ColorStop)
|
||||
return {};
|
||||
|
||||
if (!tokens.has_next_token())
|
||||
return {};
|
||||
|
||||
Vector<TElement> color_stops { first_element };
|
||||
while (tokens.has_next_token()) {
|
||||
TElement list_element {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue