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

[css-backgrounds-4] Does background-attachment: fixed work with background-clip: text? #10595

Open
OnkarRuikar opened this issue Jul 19, 2024 · 2 comments

Comments

@OnkarRuikar
Copy link
Contributor

On MDN it is mentioned that: [ref]

The background is fixed relative to the viewport. Even if an element has a scrolling mechanism, the background doesn't move with the element. (This is not compatible with background-clip: text.)

Now run this demo on Firefox and Chrome. The background stays fixed in Chrome and not in Firefox.

There is nothing in the spec that says that background-attachment: fixed doesn't work with background-clip: text. Is Chrome correct or Firefox?

From the specifications standpoint, what should happen when the background-attachment: fixed and background-clip: text properties are used together? Should the background remain fixed or scroll?

@SelenIT
Copy link
Collaborator

SelenIT commented Jul 23, 2024

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 related issue. 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.

@OnkarRuikar
Copy link
Contributor Author

OnkarRuikar commented Jul 24, 2024

As far as I know, the value text for background-clip is still considered experimental

But the MDN browser compatibility says it is a standard and not an experimental value. It looks like the text value sneaked in de facto and is not de jure.

@fantasai fantasai changed the title [css-backgrounds-3] Does background-attachment: fixed work with background-clip: text? [css-backgrounds-4] Does background-attachment: fixed work with background-clip: text? Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants