Gradient has outdated direction syntax. New syntax is like `to left` instead of `right`.

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
aliabbas
Posts: 2
Joined: 19 Jun 2018, 10:09

17 Jul 2018, 16:41

Hi,
While compiling in angular CLI getting this error:

Code: Select all

(Emitted value instead of an instance of Error) autoprefixer: /Users/XXX/projects/XXX/front-end/src/assets/sass/layout/_mixins.scss:56:4: Gradient has outdated direction syntax. New syntax is like `to left` instead of `right`.
Please help me fixing it.

Thank you.

merve7
Posts: 861
Joined: 12 Sep 2017, 10:44

18 Jul 2018, 09:25

We fixed for next release but you can use the below code until release;
in assets/sass/layout/_mixins.scss
remove background-gradient-top2bottom and background-gradient-left2right mixins and add the below mixins;
(So, "top" replaced to "to bottom" and "left" replaced to "to right" in linear-gradient functions.)

Code: Select all

 

@mixin background-gradient-top2bottom($start-color, $end-color) {
    background-color: $start-color;
    background-image: -webkit-gradient(linear, left top, left bottom, from($start-color), to($end-color));
    background-image: -webkit-linear-gradient(to bottom, $start-color, $end-color);
    background-image:    -moz-linear-gradient(to bottom, $start-color, $end-color);
    background-image:     -ms-linear-gradient(to bottom, $start-color, $end-color);
    background-image:      -o-linear-gradient(to bottom, $start-color, $end-color);
    background-image:         linear-gradient(to bottom, $start-color, $end-color);
    filter:            progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$start-color}', endColorstr='#{$end-color}');
}

@mixin background-gradient-left2right($start-color, $end-color) {
    background-color: $start-color;
    background-image: -webkit-gradient(linear, left top, right top, from($start-color), to($end-color));
    background-image: -webkit-linear-gradient(to right, $start-color, $end-color);
    background-image:    -moz-linear-gradient(to right, $start-color, $end-color);
    background-image:     -ms-linear-gradient(to right, $start-color, $end-color);
    background-image:      -o-linear-gradient(to right, $start-color, $end-color);
    background-image:         linear-gradient(to right, $start-color, $end-color);
    filter:            progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$start-color}', endColorstr='#{$end-color}', gradientType='1');
}

Post Reply

Return to “Ecuador - PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests