assign sass variable to css variable code example
Example 1: SCSS variables
$font-stack: Helvetica, sans-serif;
$primary-color: #333;
body {
font: 100% $font-stack;
color: $primary-color;
}
Example 2: Sass Variables
$myFont: Helvetica, sans-serif;
$myColor: red;
$myFontSize: 18px;
$myWidth: 680px;
body {
font-family: $myFont;
font-size: $myFontSize;
color: $myColor;
}
#container {
width: $myWidth;
}
Example 3: how to make a scss variable
$variableName = item
$gray = #404040
body{
background:$gray;
}