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

Using Chrome Developer Tools to debug your code


Nowadays, all major browsers have built-in developer tools, which can help you debug and test your code. You can use this tool to see the effect of your style rules or find unused CSS code. Most developer tools also add the performance test tools. The CSS source panel will give you insight into how CSS's precedence rules influence your style rules.

Getting ready

In this recipe, all you need to use is the Google Chrome browser.

How to do it…

  1. Create the following folder and file structure:

  2. Your index.html file can, for instance, look as follows:

    <!DOCTYPE html>
    <html>
      <head>
        <meta charset="utf-8">
        <title>Browser Developer Tools</title>
        <link rel="stylesheet/less" type="text/css" href="less/project.less">
        <script src="less/less.min.js" type="text/javascript"></script>
      </head>
      <body>
        <h1>Less Example</h1>
        <header><h1>an other heading...