Skip to content

CSS SVGRadialGradient support#8871

Open
wisniewskij wants to merge 18 commits intomainfrom
@wisniewskij/css-gradients-anim
Open

CSS SVGRadialGradient support#8871
wisniewskij wants to merge 18 commits intomainfrom
@wisniewskij/css-gradients-anim

Conversation

@wisniewskij
Copy link
Contributor

@wisniewskij wisniewskij commented Jan 26, 2026

Summary

PR adds SVG RadialGradient CSS Property which enables animation of SVG Radial Gradients.

Test plan

You can play with prepared examples:
Run fabric-example -> CSS -> Animated Properties -> SVG Properties -> RadialGradient

@wisniewskij wisniewskij requested a review from MatiPl01 January 26, 2026 12:50
@wisniewskij wisniewskij force-pushed the @wisniewskij/css-gradients-anim branch from 0c28942 to a026fda Compare January 26, 2026 12:53
@wisniewskij wisniewskij force-pushed the @wisniewskij/css-gradients-anim branch from 309593b to e51c734 Compare January 28, 2026 10:20
@wisniewskij wisniewskij self-assigned this Jan 28, 2026
@wisniewskij wisniewskij marked this pull request as ready for review February 9, 2026 10:32
@wisniewskij wisniewskij force-pushed the @wisniewskij/css-gradients-anim branch from 16c0a2a to d645f05 Compare February 11, 2026 07:19
@wisniewskij wisniewskij changed the base branch from main to @wisniewskij/process-percentage February 11, 2026 07:20
@wisniewskij wisniewskij force-pushed the @wisniewskij/css-gradients-anim branch from 9db81a7 to 90df7f2 Compare February 11, 2026 08:17
@wisniewskij wisniewskij requested a review from MatiPl01 February 11, 2026 08:18
Base automatically changed from @wisniewskij/process-percentage to main February 11, 2026 09:18
Copy link
Member

@MatiPl01 MatiPl01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job overall! I left some suggestions and questions. Please refer to them and re-request a review once you finish.

@wisniewskij wisniewskij force-pushed the @wisniewskij/css-gradients-anim branch from c0009f4 to 875d61b Compare February 11, 2026 14:06
Comment on lines +33 to +35
for (size_t i = 0; i < value.size(); i += 2) {
double offset = value[i].asDouble();
stops.emplace_back(offset, SVGBrush(value[i + 1]));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you changed it to pass values as a 1-dimension vector of numbers where offsets are at 2n indices whilst colors are at 2n + 1? I think the previous approach with offset and color properties was much cleaner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants