Closed Bug 1416885 Opened 7 years ago Closed 6 years ago

background-clip:text and background-attachment:fixed make the text fixed, not the bg

Categories

(Core :: Layout: Text and Fonts, defect)

56 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1313757

People

(Reporter: pygy79, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:56.0) Gecko/20100101 Firefox/56.0
Build ID: 20171024165158

Steps to reproduce:

Give an element the following CSS:

h1{
  background-attachment: fixed;
  -webkit-background-clip: text;
  background-clip: text;
  background-image:  radial-gradient(black, white);
  -webkit-text-fill-color: transparent;
}




Actual results:

The text of the element becomes fixed relative to the viewport.

A background-image is needed, the bug doesn't occur with background-color only (I suppose that background-attachment is ignored in the absence of background-image).


Expected results:

The text scrolls while the background stays fixed. It works fine in Chrome and Safari.

Live here:

https://flems.io/#0=N4IgzgpgNhDGAuEAmIBcIB0sxhAGhADMBLGXVAbVADsBDAWwjUwAt56p8RYB7axfswA8LAIwA+ADrUABDIDKsAE48oUGUh4B3atKEB6MVOpCADsbl795kAF88NBk3QYAVrgK9+EQejsOQOkZmLBwuLwF4ZjFgaTkAI1pYAGsAcxUAV2okAFpaeHgklkZ+VBkSAA9kAG44mRytCHjk4ngcxJT0nizc2ChiUzLECvha2RkOtMzsnL6BoYgRsYSkqe6Z4npaVIgymSVaJGJaKBz0w+IfeAAKeKhVvBktFlaIAEpl8r42sGIAL12MgArBB6J9TIcjtRUjl4DxBjIAAwYADMoM+wzaJ2IqWoZVgVwgSk+DSaLTamJyJDUs1UPCUQwO1DAEKUVzGtmkphksXGLAgOLYZVEiNFpgqn0mXR6OU220B-WoEFoSjOByOV2uiKQEFSjzuGQgj2erze0lsdgAurYgA
Summary: background-clip:text and background-position:fixed make the text fixed, not the bg → background-clip:text and background-attachment:fixed make the text fixed, not the bg
I forgot to mention: I tested this in FF 56, and in FF57 with webrendest + layers-free enabled.
Component: Untriaged → Layout: Text
Product: Firefox → Core
Already noted in bug 1313757.
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.