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 Debugging, Best Practices, and Production Moving Forward with Sass

Nick Knight
Nick Knight
8,714 Points

Extends vs. Mixins

I read through many articles on this topic as well as a discussion from two years ago on treehouse.

To me mixins create a file easier to read compared to extends. You don't have selectors repeating themselves, however, you get styles repeating themselves. It seems like the size of the file would change so little that that shouldn't be a determining factor. Plus, mixins are more versatile.

Have there been any recent changes to this debate or is it still a toss up?

1 Answer

Kevin Korte
Kevin Korte
28,109 Points

I generally like mixins over extends as well, and you should be able to get a smaller compiled codebase with mixins over extends, if I remember correctly.