close
Skip to content

Gradient backgrounds should be set with background-image instead of background #32787

@justintadlock

Description

@justintadlock

I have been attempting some work with background-clip: text like so:

-webkit-background-clip: text;
-webkit-text-fill-color: transparent; 
-moz-background-clip: text;
-moz-text-fill-color: transparent;

To create a gradient effect on text like this:

gradient-text

However, this does not work when using either gradient presets or a custom gradient. Both use background: $gradient instead of background-image: $gradient in the CSS output. By changing those to use background-image, the effect works.

I'm not sure if there are any historical reasons for going with background, but I'd love to see us move to only targeting background-image.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CSS StylingRelated to editor and front end styles, CSS-specific issues.Good First IssueAn issue that's suitable for someone looking to contribute for the first time[Status] In ProgressTracking issues with work in progress[Type] EnhancementA suggestion for improvement.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions