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) Getting Started with Sass Advanced Nesting

Jerry Malone
Jerry Malone
4,992 Points

Sass Advanced Nesting #4

Stumped on this. Preview looks fine but getting "Bummer" feedback. I'm sure I'm missing something simple. Thanks!

p {
    a {
    color: red;
    .footer & {
        color: purple;
        }
  }

  > a {
    color: blue;
    &:hover {
        opacity: 0.5;
      }

        }
}

2 Answers

Jerry Malone
Jerry Malone
4,992 Points

Perfect! Thanks much, Trent.

James Barnett
James Barnett
39,199 Points

Jerry Malone - Do you know what your mistake was in step 4 of the code challenge now?

Trent Burkenpas
Trent Burkenpas
22,388 Points
p { 
    a { 
  color:red; 
  div.footer 
  &{color:purple;
     } 
 } 
 & > a { 
 color:blue; 
 &:hover {opacity: 0.5;}
}
}

you needed the ampersand and the greater then value.

James Barnett
James Barnett
39,199 Points

Trent Burkenpas - You got the right answer for the wrong reason. This is the danger of cutting and pasting code as a way to debug other's problems rather than working off of their code.

> you needed the ampersand and the greater then value.

Changing the links blue is step 2 and makes no mention of using an ampersand selector, which is why Jerry Malone's code works fine on step 2. The ampersand selector is mentioned in step 3 however he correctly used an ampersand selector in step 3 to change the opacity.