Background is not clipped appropriately when using -webkit-background-clip: text and background-attachment: fixed on animated gif background
Categories
(Core :: Web Painting, defect, P3)
Tracking
()
Webcompat Priority | revisit |
People
(Reporter: ksenia, Unassigned)
References
(Blocks 1 open bug, )
Details
Attachments
(2 files, 2 obsolete files)
As reported here https://github.com/webcompat/web-bugs/issues/42577
Steps to reproduce: in Firefox open https://codepen.io/FlorinPop17/full/eYYdQKz and observe behavior
Expected:
Text appears on top of the image
Actual:
Can't see the text
I've attached a reduced test case as well
Aslo if I remove background-attachment: fixed
from .text-to-life
element, the text appears.
Reporter | ||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 1•5 years ago
|
||
I think the testcase can be reduced some more. I'll try that now.
Comment 2•5 years ago
|
||
The issue seems to be that -webkit-background-clip: text;
is ignored if the background image is both an animated gif and fixed. Changing the background image to a png or to a gradient makes the bug disappear.
Updated•5 years ago
|
Reporter | ||
Comment 3•5 years ago
|
||
hmm I've tried changing the image to be jpg or png, the text did not appear. So it's probably doesn't matter if the image is animated?
Reporter | ||
Comment 4•5 years ago
|
||
Reporter | ||
Comment 5•5 years ago
|
||
Comment 6•5 years ago
•
|
||
Oh, I see, I think in my testcase it mattered because I had removed the background-size: cover
. But with background-size: cover
, it no longer matters whether the image is animated.
That implicates this code in nsDisplayBackgroundImage::CanOptimizeToImageLayer and indicates that ImageLayer creation is at fault somehow.
Updated•5 years ago
|
Updated•3 years ago
|
Updated•2 years ago
|
Description
•