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 trial

CSS Sass Basics (retired) Speeding up Workflow with Sass Sass Functions

Stuck on Sass challenge and possibly next 2 challenges also

Pls help

<!DOCTYPE html>
  <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">
      Bacon ipsum dolor sit amet biltong capicola meatball, corned beef venison tongue meatloaf ham sausage jerky short loin bacon. Shoulder pork pig, pancetta turducken flank strip steak prosciutto jerky venison.
      Ground round bacon pig ribeye biltong capicola jerky prosciutto sirloin. Hamburger turducken corned beef leberkas andouille, shoulder pork shank strip steak biltong flank meatball pancetta chicken.
/* Write your SCSS code below. */

5 Answers

Hi Richard,

I recommend watching Sass Functions again to see how Hampton creates a function.

The important thing to remember about Sass functions is to always include a return statement. Here is an example that might help you get started.

@function areaRectangle($length, $width) {
  @return $length * $width;
Erwin Meesters
Erwin Meesters
15,088 Points

Try this:

@function double($input) { @return $input * 2; }

Hi thanks for the replies. I managed to solve it but seem to be stuck on another challenge now, taken me so long it timed out on the 4th challenge and now I need to start again. Really struggling with this section of the track. It seems that the challenges don't really resemble the tutorials as much as I need them to.

Which challenge are you stuck on? Sass Functions only has 3 tasks.

I am stuck on the interpolating objectives now. I cheated and found some of the answers online but timed out and couldnt find them again. It starts with saying "create a scope......." He doesnt even mention scope in the video. I am right at the end of the track and am losing my focus

Creating a scope on an element is jargon for creating a new CSS rule for an element. Scope actually refers to the curly braces { } which defines the visibility of its content.

For example,

Open a scope on an <ul> with the ID menu.

ul#menu {
  /* in the scope of the ul#menu element */

I agree with you that it could have been worded differently, and that he doesn't mention scope in the video. Hopefully this helped clarify the topic, allowing you to pass the challenge and move on.

Sass can be tricky, especially when also new to CSS. If you find yourself stuck again, don't hesitate to make a new forum post - more eyes will see it, getting you faster help. Also, the official documentation can be helpful when you know what you're looking for. Like, how to setup a @for loop.


I managed to get through the last few challenges by pasting the questions to google and cheating. It was either that or not move on. I am happy with everything else on the track and have learnt alot. I am starting the web development track now but going over the sections I have already done again just as a refresh