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 Improve Your Workflow with Sass Practice Extending a Selector

Jacob Anderson
Jacob Anderson
7,888 Points

Code challenge saying that I have border-radius wrong.

So pretty much I am stuck on the first step and I am not too sure why I am having such difficulty. The challenge is asking me to make a rule with the class .roundy and then assign a border radius of 50% and a width of 150px then use the extend to use it in a new class .img-author. Every time it tells me that I need to set %roundy border-radius to 50% but I believe I have it right.

%roundy { width: 150px; border-radius: 50%; }

.img-author { @extend %roundy; }

Thanks for the help everyone. Lets blame it on pre-work coding brain ;)

style.scss
%roundy {
  width: 150px;
  border-radius: 50%;
}

.img-author {
  @extend %roundy;
}

2 Answers

Dean Kennedy
Dean Kennedy
4,491 Points

I not sure of the syntax, but should your class not be called by a period and not a %. So change code to:

.roundy { width: 150px; border-radius: 50%; }

.img-author { @extend .roundy;

Hossein Kamalifar
PLUS
Hossein Kamalifar
Courses Plus Student 12,016 Points

answer: .roundy { width: 150px; border-radius: 50%; }

.img-author { @extend .roundy; }