Book Image

LESS WEB DEVELOPMENT ESSENTIALS

By : Bass Jobsen
Book Image

LESS WEB DEVELOPMENT ESSENTIALS

By: Bass Jobsen

Overview of this book

Less is a CSS preprocessor that essentially improves the functionality of simple CSS with the addition of several features. The book begins by teaching you how Less facilitates the process of web development. You will quickly then move on to actually creating your first layout using Less and compiling your very first Less code. Next, you will learn about variables and mixins and how they will help in building robust CSS code. In addition, you'll learn how to keep your code clean and test it by using style guides. We will then move on to the concept of Bootstrapping and the strength of using Less with Twitter Bootstrap. Going one step further, you will be able to customize Twitter's Bootstrap 3 using Less. Finally, you will learn how to integrate Less into your WordPress themes and explore other web apps that use Less. By leveraging this powerful CSS preprocessor, you will be able to consistently produce amazing web applications while making CSS code development an enjoyable experience.
Table of Contents (15 chapters)
Less Web Development Essentials
Credits
Foreword
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Using the grid mixins to build a semantic layout


In the preceding section, you used Preboot's grid mixins to build grid classes. In the final section of this chapter, you will use these mixins to build a semantic layout.

You can use the same example used earlier. Before you start, you should undo the changes made in the examples with media queries. You don't need these media queries here because the grid is responsive by default.

Note

You can watch the result by visiting http://localhost/semanticgrid.html, and you will find the Less files of this example in the /less/semanticgrid/ folder.

In the current example layout, the container styles are applied to the body element. Nowadays, there seems to be no reason to add an extra div container (wrapper). All modern browsers handle the body as a normal block level element. If you prefer to add an extra wrapper for some reason, please do so. A plausible reason to do so would be, for instance, adding copyrights under your layout; of course, the body...