Book Image

LESS WEB DEVELOPMENT COOKBOOK

Book Image

LESS WEB DEVELOPMENT COOKBOOK

Overview of this book

Table of Contents (19 chapters)
Less Web Development Cookbook
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Making custom panels


Bootstrap provides you with many CSS components to build your design. In the Making custom buttons recipe, you can read about the button component. In this recipe, you will learn how to use and reuse the panel component.

Getting ready

The steps here are similar to the Getting ready section of the Making custom buttons recipe.

How to do it...

You need to perform the following steps:

  1. Download and unzip the source files into your working directory from http://getbootstrap.com/getting-started/#download.

  2. Open the less/bootstrap.less file and write the following lines of Less code at the end of this file:

    .panel-custom { 
      .panel-variant(black; white; purple; white); 
    }
  3. Then, recompile Bootstrap's CSS by running the following command in your console:

    grunt dist
    
  4. Now, you can include the newly generated CSS code into an HTML file with the following line of code:

    <link rel="stylesheet" type="text/css" href="bootstrap-master/dist/css/bootstrap.css">

    The HTML file should also contain...