Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free triallilliancopeland
Courses Plus Student 9,587 PointsMultiple mixin arguments
Hi Still having issues with sass but am determine to understand it with your help...
the reply keeps returning that I need to include "height" in my argument...
$size: height, width;
@mixin square ($size, $color) {
color: 1px solid;
}
2 Answers
Valeshan Naidoo
27,008 PointsSo the arguments that are taken by the square mixin are just the values that would be inside particular decorators that you create inside of the mixin. Once I type @include square(100px, red), that will be the value that is for the width and height decorators, and the border is set to 1px solid red. You don't try to set any values of decorators outside of the mixin.
@mixin square($size, $color){
width: $size;
height: $size;
border: 1px solid $color
}
Hope this helps out.
lilliancopeland
Courses Plus Student 9,587 PointsThanks so much!!! I can stop banging my head against the desk. All the best and Happy Halloween!!