Skip to content

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

@OnkarRuikar

Description

@OnkarRuikar

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions