Page MenuHomePhabricator

Better support for linear-gradient
Closed, ResolvedPublic

Description

I can't add this to template styles:

background-image:linear-gradient(bottom, #eb4b2f 10%, #f29d2e 90%);

Event Timeline

I would also like to use vendor prefixed like this:

	background-image:-webkit-gradient(linear, left bottom, left top, color-stop(10%,#eb4b2f), color-stop(90%,#f29d2e));

This is probably not going to happen but... I'm adding it just for the record. We have a mobile app for android that would benefit from this

Nirmos renamed this task from Suppor for linear-gradient to Support for linear-gradient.Jun 13 2020, 11:46 PM
Izno renamed this task from Support for linear-gradient to Better support for linear-gradient.Jan 28 2021, 6:02 AM
Izno subscribed.

linear-gradient is supported in css-sanitizer, it's just sanitizing this form of it.

Looks like linear-gradient is supported but not the angle keywords. Using actual angles works:

background-image:linear-gradient(0deg, #eb4b2f 10%, #f29d2e 90%);
Izno closed this task as Resolved.EditedApr 26 2022, 4:11 PM
Izno assigned this task to Reedy.

So, your example is spelled wrong, Images 3 is to bottom. It's also definitely supported as of https://gerrit.wikimedia.org/r/c/css-sanitizer/+/562681 .

Izno added a subscriber: Reedy.