What will be the CSS output for the following Sass code?

Technology CommunityCategory: CSSWhat will be the CSS output for the following Sass code?
VietMX Staff asked 3 years ago

Consider Scss:

$style1: 100%, 70px, #fo6d06; // list
$style2: (background: #bada55, width: 100%, height: 100px); // map

@mixin box($width, $height, $background) {
    width: $width;
    height: $height;
    background-color: $background;
}

.fogdog {
    @include box($style1...); // use spread operator for the argument
}

.badass {
    @include box($style2...); // same for the map
}

Compiled CSS:

.fogdog {
    width: 100%;
    height: 70px;
    background-color: #fo6d06;
}

.badass {
    width: 100%;
    height: 100px;
    background-color: #bada55;
}