Complete the code to define a mixin named 'center' that centers content using flexbox.
@mixin [1] {
display: flex;
justify-content: center;
align-items: center;
}The mixin is named 'center' to clearly describe its purpose of centering content.
Complete the code to include the 'center' mixin inside the '.box' class.
.box {
width: 200px;
height: 200px;
background-color: lightblue;
@include [1];
}To use the mixin named 'center', you write '@include center;'.
Fix the error in the mixin usage by completing the blank.
.container {
@include [1];
padding: 1rem;
}Mixins are included without parentheses if they have no parameters, so '@include center;' is correct.
Fill both blanks to create a mixin 'box-style' that sets width and background color.
@mixin box-style($width, $color) {
width: [1];
background-color: [2];
}The mixin uses parameters $width and $color to set the width and background color properties.
Fill all three blanks to include 'box-style' mixin with width 300px and color coral inside '.card'.
.card {
@include box-style([1], [2]);
padding: [3];
}The mixin is called with '300px' for width and 'coral' for color. Padding is set to '1rem' for spacing.