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

Creating a web form


If you've spent any time looking at websites—and in this modern day of technology, it would be difficult not to—then you will have come across, or needed to use, the ubiquitous contact form. They pop up everywhere—you could almost take the cynical view that people use them as a means of avoiding human contact!

Nonetheless, they still serve a valid purpose. Over the next few sections, we're going to develop a simple contact form and enhance it using Less mixins to illustrate how they can be used to reduce the amount of code that we need to write.

Note

For this example, you will need to avail yourself of a copy of the code download that accompanies this book, as we will be using content from it during the exercise.

Start by opening a copy of project.html, which we created earlier, and then updating the <head> section, as follows:

  <head>
    <meta charset="utf-8">
    <title>Demo: Mixins</title>
    <link rel="stylesheet" href="css/buttons.css...