Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS CSS to Sass Refactoring with Sass Placeholder Selectors

Why do I get this error in my console?

I have followed step by step what Guil has done in the video but when I add the @extend %centered; to the primary-content, the following error appears in the console:
error scss/layout/_containers.scss (Line 11: ".primary-content" failed to @extend "%cen tered".
The selector "%centered" was not found.
Use "@extend %centered !optional" if the extend should be able to fail.

Please help. Thanks!

Sorry! My bad. He gives an explanation further on in the video.

1 Answer

Nicholas Olsen
Nicholas Olsen
Front End Web Development Techdegree Student 19,342 Points

That error suggests that sass can not see your %centered placeholder. Check to make sure it is named correctly, there are no typos and that any files you need to include have been included.