O'Reilly logo

Bootstrap 4 Site Blueprints by Ian Whitley, David Cochran, Bass Jobsen

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

Reusing the SCSS code of the social buttons

As a bonus, we'll add a fixed list of social media buttons at the left side of our page, which will look like that shown in the following screenshot:

Reusing the SCSS code of the social buttons

First add the following HTML snippets at the end of the html/includes/footer.html file:

     <div class="social-buttons fixed-media bg-accent-color"> 
    <ul> 
        <li>FB</li> 
        <li>TW</li> 
        <li>G+</li> 
    </ul> 
    </div> 

Notice that the bg-accent-color is added to the wrapping <div> element.

The only SCSS code we have to edit to the scss/includes/_footer.scss is as follows:

.social-buttons { &.fixed-media { display: none; @include media-breakpoint-up(md) { position: fixed; top: 150px; ...

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