Complete the code to declare a variable in SASS.
$primary-color: [1];In SASS, variables start with a $ and store values like colors. Here, #333 is a valid color value.
Complete the code to nest CSS selectors in SASS.
nav {
ul {
[1]: none;
}
}Nesting selectors in SASS lets you write CSS inside CSS. Here, list-style: none; removes bullet points from lists.
Fix the error in the SASS code to correctly use a mixin.
@mixin border-radius($radius) {
border-radius: [1];
}
.box {
@include border-radius(10px);
}Inside a mixin, use the parameter name with a dollar sign to apply the value passed in. Here, $radius is correct.
Fill both blanks to create a SASS map and access its value.
$colors: (primary: [1], secondary: [2]); .button { color: map-get($colors, primary); }
A SASS map stores key-value pairs. Here, primary is #ff0000 (red) and secondary is #0000ff (blue).
Fill all three blanks to write a SASS function that doubles a number.
@function [1]($n) { @return $n [2] [3]; } .box { width: double(5) * 1rem; }
This function named double takes a number $n and returns it multiplied by 2.