Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark background-clip: text as fully supported + correct history of Safari support #7204

Merged
merged 4 commits into from
Nov 8, 2024

Conversation

jensimmons
Copy link
Contributor

background-clip: text is very well supported, and authors should feel confident in using it to create effects like this demo:
Screenshot 2024-11-07 at 12 56 53 PM

However, on Can I Use, the vast majority of implementations of background-clip: text are currently marked "partial" because of a minor bug where if the author wraps the text in an inner element, and puts position: relative or absolute on it, the background image doesn't appear.

However, this's not at all a common situation. I can't think of even one use case for this:

<h1><span>Hello world</span></h1>

h1 { 
  background-image: linear-gradient(red, blue);
  background-clip: text;
  color: transparent; 
}
span { position: relative; }

Meanwhile this works fine (see demo of both):

<h1>Hello world</h1>

h1 { 
  background-image: linear-gradient(red, blue);
  background-clip: text;
  color: transparent; 
  position: relative;
}

Therefore, I do not believe implementations deserve getting a "partial support" designation. Noting the bug is a good idea (so I left the footnote) but Can I Use does not usually withhold full support for a bug on a rare condition.

I noticed that Safari 3.1 and 3.2 were marked "unknown", while Safari 3.2 was the first browser will support. So I did some historical digging, talking to folks at Apple. 

The feature was committed to WebKit on March 20, 2008 (three days after Safari 3.1 shipped). Which means it was not in Safari 3.1, so I marked that not supported. And since Safari 3.2 was shipped with all changes in Nov 2008, that's the first this feature appeared, so I marked 3.2 as supported.

WebKit/WebKit@63b6483
@jensimmons
Copy link
Contributor Author

jensimmons commented Nov 7, 2024

Second commit:

I noticed that Safari 3.1 and 3.2 were marked "unknown", while Safari 4 was the first browser marked with support. So I did some historical digging, talking to folks at Apple.

The feature was committed to WebKit on March 20, 2008 (three days after Safari 3.1 shipped). Which means it was not in Safari 3.1, so I marked that not supported. And since Safari 3.2 was shipped with all changes in Nov 2008, that's the first this feature appeared, so I marked 3.2 as supported.

Can I Use marked Safari as unprefixing in Safari 14, in 2020. That struck me as odd, so I looked into it.

Actually, we unprefixed in Safari 5: WebKit/WebKit@740414a

I wondered where the Safari 14 date came from. It looks like someone noticed in 2020 that Safari was marked as requiring a prefix. They tested and saw that was wrong, that unprefixed worked. So they just changed the current version of Safari. They did not look into the history. Fyrd#6106

Safari 14 is definitely wrong.
Filling in the earliest data for Safari on iOS.
@jensimmons
Copy link
Contributor Author

jensimmons commented Nov 7, 2024

Third commit: Safari unprefixed background-clip in 2010

Can I Use marked Safari as unprefixing in Safari 14, in 2020. That struck me as odd, so I looked into it.

Actually, we unprefixed in Safari 5: WebKit/WebKit@740414a

I wondered where the Safari 14 date came from. It looks like someone noticed in 2020 that Safari was marked as requiring a prefix. They tested and saw that was wrong, that unprefixed worked. So they just changed the current version of Safari. They did not look into the history. #6106

Safari 14 is definitely wrong.

@jensimmons
Copy link
Contributor Author

The fourth commit fills in the earliest data for Safari on iOS.

@jensimmons jensimmons changed the title Mark background-clip: text as fully supported Mark background-clip: text as fully supported + correct history of Safari support Nov 7, 2024
@Fyrd
Copy link
Owner

Fyrd commented Nov 8, 2024

Yeah, looking at this again I agree this bug doesn't warrant partial support. Thanks for the research & updates!

@Fyrd Fyrd merged commit 52535f5 into Fyrd:main Nov 8, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants