From the course: SharePoint Framework for Developers: 1 Understanding the Toolchain

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Sass extends

Sass extends

- [Instructor] I just showed you the concept of mixins, where we had these two divs and with the help help of Sass we were able to create very similar styles with mixins. So they both have a height and width and they both have a background color, but I could parameterize them and therefore get two completely different albeit similar styles out of one single mixin. But now let's say that we have a new requirement. Now we need a big red square with a border. So if you think about it, this style.scss and the mixin that I have currently doesn't have any concept of border. So the only difference between big red square and big red square with border is that the big red square with border will have a border. So I need to add one style. Won't it be nice if I could somehow extend the definition of big red square? Okay 'cause that's the only thing I'm looking to extend. And I want to just add a style on top. Yes, you can with Sass you have a concept called extend. Let's see how. So I'm going to…

Contents