Complete the code to import a SASS partial file named '_variables.scss'.
@import '[1]';
In SASS, you import partials without the underscore and file extension. So '@import "variables";' correctly imports '_variables.scss'.
Complete the PostCSS config to use the autoprefixer plugin.
module.exports = {
plugins: [
require('[1]')()
]
};The autoprefixer plugin automatically adds vendor prefixes to CSS rules. You require it as 'autoprefixer' in the PostCSS config.
Fix the error in the SASS variable usage inside a nested rule.
.button {
$color: blue;
color: [1];
}To use a SASS variable, you must prefix it with '$'. So 'color: $color;' correctly uses the variable.
Fill both blanks to create a PostCSS plugin list with 'postcss-import' and 'cssnano'.
module.exports = {
plugins: [
require('[1]')(),
require('[2]')()
]
};The 'postcss-import' plugin allows importing CSS files, and 'cssnano' minifies CSS. Both are required as plugins in PostCSS.
Fill all three blanks to create a SASS map, access a value, and check a condition.
$colors: (primary: blue, secondary: green, accent: red);
.button {
color: map-get($colors, '[1]');
@if map-get($colors, '[2]') == [3] {
font-weight: bold;
}
}The map '$colors' holds color names. We get 'primary' color for the button color. Then we check if the 'accent' color equals 'red' to make font bold.