Bug 213220 - Background-clip + background-image are buggy applied on long inline element
Summary: Background-clip + background-image are buggy applied on long inline element
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari 13
Hardware: iPhone / iPad iOS 13
: P2 Normal
Assignee: Nobody
URL: https://codepen.io/kloh/pen/RwrGprV
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-06-15 15:08 PDT by Luc Poupard
Modified: 2022-03-30 23:08 PDT (History)
8 users (show)

See Also:


Attachments
Demo on Codepen (35 bytes, text/plain)
2020-06-15 15:08 PDT, Luc Poupard
no flags Details
Screenshot of bug (CodePen example) (120.61 KB, image/jpeg)
2020-06-15 22:20 PDT, Luc Poupard
no flags Details
Preview of the bug: background-clip vs text (52.95 KB, image/jpeg)
2020-06-15 22:23 PDT, Luc Poupard
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luc Poupard 2020-06-15 15:08:17 PDT
Created attachment 401946 [details]
Demo on Codepen

Hello,

I was trying to make some links fancy with a linear-gradient applied on text thanks to background-clip:text and color:transparent.
It fits well until the link become too long so it returns to the next line. When the case happens, text is like cropped in a weird way.

I made a codepen to demonstrate: https://codepen.io/kloh/pen/RwrGprV

Tested on an iPhone 11.
Comment 1 Radar WebKit Bug Importer 2020-06-15 15:54:18 PDT
<rdar://problem/64382612>
Comment 2 Luc Poupard 2020-06-15 22:20:18 PDT
Created attachment 401982 [details]
Screenshot of bug (CodePen example)
Comment 3 Luc Poupard 2020-06-15 22:23:53 PDT
Created attachment 401983 [details]
Preview of the bug: background-clip vs text

As text is cropped, I made an example where we can see the background-clipped tex is shifted compared to real text (with opacity)
Comment 4 Luc Poupard 2020-07-10 23:33:14 PDT
I've updated the title because I just realized that classic background-image gradient (with image file) is also broken.
I've updated the linked codepen in my first message.
Comment 5 Stephen Nixon 2021-01-29 09:06:39 PST
I am running into the same problem in text on my blog. This works perfectly in Chromium, but seems to fail in WebKit. It would be a really nice thing to be able to do inline gradients in running, wrapped text!

https://github.com/arrowtype/blog/issues/21
Comment 6 Simon Fraser (smfr) 2022-03-30 23:08:42 PDT
I believe this bug is fixed in iOS 15.4