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 trialMUZ140112 Simon Chatikita
4,174 Pointsnderneath your mixin definition, specify that all <a> tags should include the mixin.
nderneath your mixin definition, specify that all <a> tags should include the mixin.
<!DOCTYPE html>
<html>
<head>
<title>Sass Basics - Code Challenge</title>
<link rel="stylesheet" type="text/css" href="page-style.css">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<h1>Hampton's Blog</h1>
<div class="entry">
<h1>Great Music</h1>
<div class="content">
<p>
Here are some of my favorite bands from years past and present: Belle and Sebastian, Pixies, and Daft Punk. Listening to music allows me to focus when I'm programming.
</p>
<a href="#">Read More</a>
</div>
</div>
</body>
</html>
* Write your SCSS code below. */
@mixin button($background, $color) {
background: $background;
color: $color;
}
a {
@include button;
}
1 Answer
Daniel Lavin
10,743 PointsHi Simon,
If I understand correctly, you are wondering why the following code does not work?
* Write your SCSS code below. */
@mixin button($background, $color) {
background: $background;
color: $color;
}
a {
@include button;
}
The first problem I see is with the code comment. It appears to be missing a /
Try changing it to something like this:
// Write your SCSS code below
The second issue I see is that you're calling the mixin without passing in any arguments. As it's currently written the mixin accepts 2 arguments ($background and $color). Since you're not setting a default for those arguments, you will most likely see an error like so:
Mixin button is missing argument $background.
Thus, in order to make this pass, try passing a background and color to your button mixin. Hopefully that helps. If you're still having trouble, let me know