Home > Mobile >  Sass @forward prefix with variables is not work
Sass @forward prefix with variables is not work

Time:07-19

Hi i have a problem about Sass @forward. Problem is when i try @forward prefix with variables it is not work. example:

@forward 'color.scss' as red-*;
$black:#000;
@use 'forward' as f;
body{
background-color:f.red-$black;
}

CodePudding user response:

Forwarding prefixes are applied after the $. Docs: https://sass-lang.com/documentation/at-rules/forward#adding-a-prefix

body {
    background-color: f.$red-black;
}
  • Related