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 trialJordin Marshall
26,782 PointsRefactor this. The function as well as the multiple parameters aren't needed.
This is a lot quicker and a direct way of writing the same code shown in the video
@mixin random-color($attr){
#{$attr}: rgba(random(255),random(255),random(255), random()*1);
}
.random-color{
@include random-color(background-color);
}
Jordin Marshall
26,782 PointsSteven Parker it was suppose to go under "Using Random functions in your Designs"
Steven Parker
231,110 PointsI was hoping you might provide a link to the actual video.
Jordin Marshall
26,782 PointsSteven Parker but that would've been way to easy lol https://teamtreehouse.com/library/advanced-sass/advanced-functions/using-random-functions-in-your-designs
Steven Parker
231,110 PointsSteven Parker
231,110 PointsWhich video are you referring to?