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

Firefox only partially supports background-clip: text #23966

Merged
merged 10 commits into from
Oct 7, 2024
Merged

Conversation

SelenIT
Copy link
Contributor

@SelenIT SelenIT commented Jul 27, 2024

Summary

Mark background-clip:text as experimental (since it's only in the CSS Backgrounds 4 editor's draft) and mark Firefox's implementation as experimental because of many open issues related to it.

Add background-clip:border from the same spec for consistency.

Test results and supporting details

None

Related issues

Fixes #23943

Mark background-clip:text as experimental (since it's only in the CSS Backgrounds 4 editor's draft) and mark Firefox's implementation as experimental because of many open issues related to it. Add background-clip:border from the same spec for consistency
@github-actions github-actions bot added the data:css Compat data for CSS features. https://developer.mozilla.org/docs/Web/CSS label Jul 27, 2024
SelenIT added 5 commits July 27, 2024 12:40
remove stray comma
Fix formatting errors found by auto tests, some minor edits
Fix link formatting
Had to mark `background-clip:text` as non-standard because the autotests rule doesn't allow to mark its experimental support as experimental only because it's supported in many WebKit clones, despite Firefox's partial support is far from complete
@SelenIT
Copy link
Contributor Author

SelenIT commented Jul 27, 2024

The auto tests script states that "Experimental should be set to false as the feature is supported in multiple browser engines" and marks experimental status for background-clip:text as "Error", but I believe this particular case is a valid exception from this rule, as the "should" keyword is supposed to allow.

The text value for background-clip property was unilaterally added by WebKit as a non-standard extension and became widely supported only because WebKit and its derivative Blink engines became so popular. The CSSWG has opposed standardizing this feature for years, it was never properly specified. Firefox's implementation still lacks some important use cases like multi-layer backgrounds combining text with other background-clip values for other layers. Since this value is in the spec draft now, it can't be marked as non-standard anymore, but marking it non-experimental only because of popularity of the clones of the engine that introduced this experimental feature doesn't feel right.

I would suggest keeping its experimental status until the CSS Backgrounds Level 4 spec matures and/or Firefox's implementation issues are fixed, if it's possible.

remove experimental status of background-clip:text as the linter suggests
@@ -101,6 +104,42 @@
"deprecated": false
}
},
"border": {
"__compat": {
"spec_url": "https://drafts.csswg.org/css-backgrounds-4/#valdef-background-clip-border",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -101,6 +104,42 @@
"deprecated": false
}
},
"border": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that it has been renamed to border-area in the specification.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, WebKit recently implemented border-area value.

@github-actions github-actions bot added the merge conflicts 🚧 This PR needs to merge latest "main" branch to resolve a merge conflict or other issue. label Sep 9, 2024
Copy link

github-actions bot commented Sep 9, 2024

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions bot removed the merge conflicts 🚧 This PR needs to merge latest "main" branch to resolve a merge conflict or other issue. label Oct 2, 2024
@caugner caugner changed the title Update background-clip:text status, add background-clip:border Update background-clip:text status Oct 2, 2024
Copy link
Contributor

@caugner caugner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that background-clip: border-radius was meanwhile added via #24333.

The IE note fixes make sense.

As for the Firefox comment, let's add specific bug links to the mentioned issues.

css/properties/background-clip.json Outdated Show resolved Hide resolved
@caugner caugner changed the title Update background-clip:text status Firefox only partially supports background-clip: text Oct 7, 2024
@caugner caugner merged commit d05e4b4 into mdn:main Oct 7, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:css Compat data for CSS features. https://developer.mozilla.org/docs/Web/CSS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

css.properties.background-clip - though browsers support text value, the spec still says it's experimental
4 participants