Complete the code to declare a SASS variable for primary color.
$primary-color: [1];The correct way to declare a color variable in SASS is by assigning a color value like a hex code.
Complete the code to create a nested style for a button inside a container.
.container {
.button [1] {
background-color: $primary-color;
}
}In SASS, to style a hover state nested inside a selector, use &:hover to refer to the parent selector with hover.
Fix the error in the SASS mixin definition to accept a color parameter.
@mixin button-style($color) {
background-color: [1];
border: 1px solid darken($color, 10%);
}The mixin uses the parameter $color to set the background color, so the variable $color must be used.
Fill both blanks to create a map of font sizes and access a size.
$font-sizes: (small: 0.8rem, medium: 1[1]rem); body { font-size: map-get($font-sizes, [2]); }
The font size for medium is 1.5rem, so .5 completes 1.5rem. Then medium is used to get that size from the map.
Fill all three blanks to create a responsive grid with SASS variables and media query.
$columns: 12; $gap: 1[1]rem; .container { display: grid; grid-template-columns: repeat([2], 1fr); gap: $gap; } @media (max-width: [3]) { .container { grid-template-columns: repeat(6, 1fr); } }
The gap is 1.5rem, so .5 completes it. The grid uses 12 columns, so 12 is correct. The media query breakpoint is commonly 768px for tablets.