O'Reilly logo

Mastering Sass by Luke Watts

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Featured products

Before we move on to the testimonials I want to add our primary color to the buttons and product titles in the Featured Products section. After all, we want the products to stand out.

Once again, a color can be passed into our media mixins to set the title and button colors. Therefore, we should apply our color using those mixins. That way we prevent unnecessary duplication in our final CSS output.

Open scss/components/_product-centered.scss and make one simple modification:

.product-centered { 
    @include media-centered($img: fullwidth, $color: get($theme, color, primary)); 
 
    padding-left: 0; 
    padding-right: 0; 
 
    &-title { 
        margin-top: 0 
    } 
}  

Our Featured Products section should now be much more eye-catching:

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required