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

Customizing Bootstrap with variables


In the less directory of your Bootstrap installation, you will find the variables.less file. The variables.less file is the sole place to edit and customize Bootstrap.

Getting ready

Download and install Bootstrap as described in the Downloading and installing Bootstrap recipe of this chapter. The Less files are compiled by leveraging Grunt.

How to do it...

You need to do the following:

  1. Create an index.html file that loads the dist/css/bootstrap.css file from your Bootstrap installation and contains the HTML code similar to what is shown here:

    <!DOCTYPE html>
    <html>
    <head>
    <title>Bootstrap's Buttons</title>
    <link rel="stylesheet" type="text/css" href="bootstrap-master/dist/css/bootstrap.css">
    </head>
    <body>
    
    <!-- Standard button -->
    <button type="button" class="btn btn-default">Default</button>
    
    <!-- Provides extra visual weight and identifies the primary action in a set of buttons -->
    ...