Skip to content

Refactor background-gradient methods with string-replace functions #5

Description

@bcinarli

Current background gradient method only add prefixed values. There is no fallback and W3C standart definition addition.

Use string-replace methods for defining the accepted background-gradient definition and add other fallback with one call like

@include linear-gradient(to bottom, #fff, #999);

should output

background: -moz-linear-gradient(top, #fff, #999);
background: -webkit-linear-gradient(top, #fff, #999);
background: -o-linear-gradient(top, #fff, #999);
background: -ms-linear-gradient(top, #fff, #999);
background: linear-gradient(to bottom, #fff, #999);

or

background: -moz-linear-gradient(top bottom, #fff, #999);
background: -webkit-linear-gradient(top bottom, #fff, #999);
background: -o-linear-gradient(top bottom, #fff, #999);
background: -ms-linear-gradient(top bottom, #fff, #999);
background: linear-gradient(to bottom, #fff, #999);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions