1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 20:37:34 +00:00

LibWeb: Resolve double-position linear-gradient() color stops

These just resolve to an extra color stop.
Something like "red 10% 40%"  is just shorthand for "red 10%, red 40%".
This commit is contained in:
MacDue 2022-08-22 21:48:29 +01:00 committed by Andreas Kling
parent fa5c2183df
commit 698717d102
2 changed files with 37 additions and 30 deletions

View file

@ -16,7 +16,7 @@ namespace Web::Painting {
struct ColorStop {
Gfx::Color color;
float position = 0;
float position = AK::NaN<float>;
Optional<float> transition_hint = {};
};