List arguments problem


#1

https://www.codecademy.com/courses/learn-sass/lessons/mixins-and-parent-selector/exercises/mixins-ii?action=lesson_resume
At the top of main.scss, make a new list variable;

$stripe-properties: to bottom, 15%, blue, white;
Include the stripes mixin inside of the .definition selector:

.definition {
@include stripes($stripe-properties...);
}
At the top of main.scss, make a new list variable:

$stripe-properties: to bottom, 15%, blue, white;
Include the stripes mixin inside of the .definition selector:

.definition {
@include stripes($stripe-properties...);
}THE QUESTION
1-At the top of main.scss, make a new list variable:

$stripe-properties: to bottom, 15%, blue, white;
Include the stripes mixin inside of the .definition selector:

.definition {
@include stripes($stripe-properties...);
}
THE ANSWER
$stripe-properties: to bottom, 15%, blue, white;

@mixin stripes($direction, $width-percent, $stripe-color, $stripe-background: #FFF) {
.definition {
@include stripes($stripe-properties...);
}
background: repeating-linear-gradient(
$direction,
$stripe-background,
$stripe-background ($width-percent - 1),
$stripe-color 1%,
$stripe-background $width-percent
);
}
background: repeating-linear-gradient(
$direction,
$stripe-background,
$stripe-background ($width-percent - 1),
$stripe-color 1%,
$stripe-background $width-percent
);
}


#2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.