WeasyPrint icon indicating copy to clipboard operation
WeasyPrint copied to clipboard

Support for new 'background-clip' value 'text'

Open d0ntcopythatfloppy opened this issue 10 months ago • 1 comments

I'm trying to create text with a color gradient by setting the 'background-clip' CSS property to 'text' as described below: https://developer.mozilla.org/en-US/docs/Web/CSS/background-clip

WeasyPrint does not recognize 'text' as a valid value for 'background-clip': Error Message

Here is example HTML/CSS creating the desired effect in a sandbox: Example

.text-red-blue-gradient { font-size: 80px; background: linear-gradient(to right, red, blue); background-clip: text; color: transparent; }

Will WeasyPrint support the new spec for the 'background-clip' property in the future?

Thanks!

d0ntcopythatfloppy avatar Feb 10 '25 16:02 d0ntcopythatfloppy

Hi!

Will WeasyPrint support the new spec for the 'background-clip' property in the future?

That would be a good idea! This value has been added in Background Level 4, with border-area.

liZe avatar Feb 10 '25 16:02 liZe