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

It is unclear why background-attachment: fixed is said to be incompatible with background-clip: text #26445

Closed
Kaiido opened this issue Apr 27, 2023 · 1 comment · Fixed by #35020
Labels
Content:CSS Cascading Style Sheets docs help wanted If you know something about this topic, we would love your help!

Comments

@Kaiido
Copy link
Contributor

Kaiido commented Apr 27, 2023

MDN URL

https://developer.mozilla.org/en-US/docs/Web/CSS/background-attachment

What specific section or headline is this issue about?

https://developer.mozilla.org/en-US/docs/Web/CSS/background-attachment#values

What information was incorrect, unhelpful, or incomplete?

The fixed section says

(This is not compatible with background-clip: text.)

However, by looking at the linked specs, there doesn't seem to be anything suggesting so. Even MDN's background-clip article doesn't mention this.

And when testing it seems that both Safari and Chrome do handle it correctly, but it's true that apparently Firefox is buggy here (we need to force a recalc when scrolling). But that sounds just like a Firefox bug, and not a true -by design- limitation of the API.

What did you expect to see?

Either a note in the compatibility table stating that Firefox has this bug, if it's indeed a known bug, and a link to the bugzilla issue, or a clear pointer to the specs that states that this combination is indeed not supposed to work, and in that case the same note in the background-clip article.

Do you have any supporting links, references, or citations?

I don't but that's kind of the point, I am requesting for such links, references, or citations to support the current claim.

Do you have anything more you want to share?

No response

MDN metadata

Page report details
@Kaiido Kaiido added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Apr 27, 2023
@github-actions github-actions bot added the Content:CSS Cascading Style Sheets docs label Apr 27, 2023
@Josh-Cena Josh-Cena added help wanted If you know something about this topic, we would love your help! and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels May 21, 2023
@OnkarRuikar
Copy link
Contributor

From the specifications point of view, the text value of the background-clip property hasn't been fully ironed out yet. Hence, it's still experimental:

Well, recall that this property value was introduced unilaterally by one browser, meant for internal usage but exposed to the wider web, without any spec whatsoever nor particular effort on the part of that browser's engineers to specify it. Sometimes that sort of thing still works out quickly when others do the legwork, but sometimes it falls thru the cracks. This is particularly the case when the feature itself is bad, as this one is. (The use-case is great, but the way this feature solves it is bad, as it fails inaccessibly - if the image doesn't load, you're left with unreadable transparent text.) The only reason we're specifying it at all is that it's used widely enough on the public web that browsers need to support it. [ref].

As far as I know, the value text for background-clip is still considered experimental, it doesn't exist at all in the spec you linked to ([css-backgrounds-3]) and was introduced only in [css-backgrounds-4] which is marked "not ready for implementation". There are some useful notes on the history of this value in the w3c/csswg-drafts#9907 (comment). Firefox has "backported" this value for the most popular use cases only. Likely Chrome's behavior is "more correct", but it's hard to file bugs against browsers until this value is specified properly. [ref]

I think the claim (This is not compatible with background-clip: text.) is not substantial and should be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:CSS Cascading Style Sheets docs help wanted If you know something about this topic, we would love your help!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants