Back to colors

Right, back to colors. Let's bring together a few of the techniques we have learnt in this and previous chapters to convert the top links (currently sitting on the right-hand side of the header area) into buttons.

We will create a mixin that will let us easily create button variations, providing various foreground and background colors. As ever, when writing a custom mixin, the pay off is greater the more often the job needs repeating. In our little site, it's arguably not worth the bother, but the technique is worth understanding for that occasion when multiple yet varied versions of a similar style are required.

The _mixins.scss partial is where the following code will be added.

Don't be alarmed, the following code might look like ...

Get Sass and Compass for Designers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.