Complete the code to declare a SASS variable for a primary color.
$primary-color: [1];In SASS, variables start with a $ and are assigned values like colors using hex codes.
Complete the code to nest CSS selectors in SASS.
.button {
color: white;
&:[1] {
background-color: blue;
}
}In SASS, &:hover is used to style the hover state of an element.
Fix the error in the CSS-in-JS style object to correctly set the background color.
const styles = {
container: {
backgroundColor: [1]
}
};In CSS-in-JS, color values must be strings, so use quotes around the color name.
Fill both blanks to create a SASS mixin and use it in a class.
@mixin [1]($color) { color: $color; } .text { @include [2](red); }
A SASS mixin is defined with @mixin and included with @include. The same name must be used for both.
Fill all three blanks to create a CSS-in-JS style with a hover effect.
const styles = {
button: {
backgroundColor: [1],
color: [2],
'&:[3]': {
backgroundColor: 'darkblue'
}
}
};In CSS-in-JS, colors are strings and hover styles use the &:hover selector as a key.
