SCSS Variable

SCSS variable is used to store information that you want to reuse throughout your stylesheet. You can store things like color, fonts, or any other CSS values you think you'll reuse it. It uses '$' symbol to create variable.

Code Structure:
$font-family: 'Arial', sans-serif;
$primary-color: #000;

body{
  font: 20px $font-family;
  color: $primary-color;
}
Result:
body{
  font: 20px 'Arial', sans-serif;
  color: #000;
}

Share this

Related Posts