From the course: Sass Essential Training

Unlock the full course today

Join today to access over 23,100 courses taught by industry experts.

Challenge: Build a button mixin

Challenge: Build a button mixin - Sass Tutorial

From the course: Sass Essential Training

Challenge: Build a button mixin

(upbeat music) - All right, it's time for a challenge. Let's try using some of what we've learned to create a mixin that will help us generate a series of related message classes. I've created a URL here so that you can get to the starter version of this problem as well as the solution of the problem. Let's take a look at the parameters I'd like you to follow. First, we'll create a message mixin, that will help us generate a series of related message classes. We'll make sure our mixin has a default value for a background color, and that we're using nested styles to make it easier to define our classes. Now, be sure to add a hover state, so that when we roll over a message, it highlights in some way. Also, try to use a parent selector to help you build a variant of the main message class called Info. I've given you the code to get started, so let's take a look at the solution first, and then we'll go back and take…

Contents