Use CSS3 variable and SASS rgba($hex, $alpha) function isn't working in Angular

16 Views Asked by At

I build Angular project, and have following sass code:

// style.scss
:root {
  --style: rgba(#fff, 0.5);
}

Angular render CSS file (I use the CSS file in my project):

// style.css
:root {
  --style: rgba(#fff, 0.5);
}

The result what I want (or any other things that the browser can use).

:root {
  --style: rgba(255, 255, 255, 0.5);
}

I think rgba() is basic function of SASS. Did I do something wrong?


@angular/cli: 9.1.15

0

There are 0 best solutions below