Bug 245480 - Incorrect rendering with background-clip:text and a relpos inline child
Summary: Incorrect rendering with background-clip:text and a relpos inline child
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: All macOS 12
: P2 Normal
Assignee: Nobody
URL: https://ayviza.com
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2022-09-21 08:13 PDT by Raul
Modified: 2022-09-29 04:58 PDT (History)
7 users (show)

See Also:


Attachments
pic of the issue (2.53 MB, image/png)
2022-09-21 08:13 PDT, Raul
no flags Details
Test reduction (254 bytes, text/html)
2022-09-21 16:24 PDT, zalan
no flags Details
rendering in safari, firefox, chrome (148.30 KB, image/png)
2022-09-28 00:27 PDT, Karl Dubost
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Raul 2022-09-21 08:13:22 PDT
Created attachment 462505 [details]
pic of the issue

My website has 2 home menues on top on the orginal see www.ayviza.com, only happen on safari, Version 16.0 (17614.1.25.9.10, 17614) no chrome neither firefox, please help.
Comment 1 Ahmad Saleem 2022-09-21 15:34:02 PDT
I am able to reproduce this bug in Safari 16 and Safari Technology Preview 154 similar to attached reference screenshot and other browsers (Chrome Canary 108 and Firefox Nightly 107) does not have this issue. Thanks!
Comment 2 Raul 2022-09-21 15:52:54 PDT
So what’s next? How to fix this issue?
Comment 3 zalan 2022-09-21 16:24:59 PDT
Created attachment 462522 [details]
Test reduction
Comment 4 Raul 2022-09-21 17:01:21 PDT
Sorry I’m not a developer how to fix this again? The website is on Wordpress 6,0 do I need to to something? Add or remove and where? Sorry totally new to this?
Comment 5 Alexey Proskuryakov 2022-09-21 19:28:35 PDT
> Test reduction

This reduction looks differently in Safari, Chrome and Firefox. But the website is only broken in Safari.
Comment 6 zalan 2022-09-22 07:01:13 PDT
(In reply to Alexey Proskuryakov from comment #5)
> > Test reduction
> 
> This reduction looks differently in Safari, Chrome and Firefox. But the
> website is only broken in Safari.
Correct. Adding the -webkit prefix to background-clip (-webkit-background-clip: text) makes the test case consistent with what we see on the web page.
Comment 7 Raul 2022-09-22 16:09:03 PDT
Ok, can you show me how to add this on wordpress or safari not sure how to follow this i'm not a developer? Thanks
Comment 8 Karl Dubost 2022-09-28 00:27:27 PDT
Created attachment 462674 [details]
rendering in safari, firefox, chrome

ok it took me a bit of time to reduce.
And the behavior is different on the 3 browsers.
This is working only with inline elements, not box elements. 


clipped green text on Safari
transparent on Firefox
Green square on Chrome

https://codepen.io/webcompat/pen/PoeQPbB
Comment 9 Karl Dubost 2022-09-28 00:33:18 PDT
For Raul, 

Just remove these two properties in between 
    position: relative;
    top: 10px;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;

from 

.bold-text1 {
    padding-left: 0px;
    background-color: #18143b;
    font-family: Poppins, sans-serif;
    color: #18143b;
    font-size: 15px;
    line-height: 25px;
    font-weight: 500;
}


 in https://ayviza.com/wp-content/themes/ayviza-1/assets/css/ayviza.webflow.css?ver=1662677910

And if you do not understand what that means, here is not exactly the right place, but you should ask to the person who created the website for you.
Comment 10 Karl Dubost 2022-09-28 00:35:31 PDT
Just noticed zalan test reduction. It exhibits the same issues in the 3 browsers.
Comment 11 Karl Dubost 2022-09-28 00:49:15 PDT
The implementations in both Firefox and Chrome have a couple of issues

Series of issues on Firefox
https://bugzilla.mozilla.org/show_bug.cgi?id=1656784

In chrome, background-clip: text is not yet supported.
https://bugs.chromium.org/p/chromium/issues/detail?id=1339290


Adding -webkit-background-clip: text

makes Firefox and Chrome behaving the same and Safari the outlier.
Comment 12 Radar WebKit Bug Importer 2022-09-28 08:14:19 PDT
<rdar://problem/100509488>