Book Image

Learning less.js

Book Image

Learning less.js

Overview of this book

Table of Contents (22 chapters)
Learning Less.js
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Diagnosing the problem


To see the problem in the flesh, so to speak, we need to view the source code for a Bootstrap-enabled site; ironically, the main Bootstrap website has several examples, which clearly show the issue!

Begin by navigating to http://getbootstrap.com/examples/blog/, which is the demo site for Bootstrap's Blog Theme. Right-click anywhere on the page to select the source code as seen in the browser. If you scroll down to on or around line 42, you will see the following:

In the screenshot, lines 50 and 52 have been highlighted, which are perfect examples of nonsemantic code; the three styles that have been added all belong to Bootstrap. "Why should we not use them when they are clearly a part of Bootstrap?", I hear you ask.

Note

For a useful introduction to the benefits of separating markup, then look no further than the book, Designing with Web Standards, by Jeffery Zeldman (and Ethan Marcotte, from Version 3 onwards).

The answer is simple—the HTML markup should describe the meaning...