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

Chapter 7. Manipulating Fonts with Less

We explored how to use the various elements of Less, created a basic page to use Less, and covered how to migrate a site to use Less….so, what's next?

Ah yes, working with text or to be more specific, fonts!

It goes without saying that content is king on any website—part of achieving the right impact is the careful selection of fonts that should be used on your site. We wouldn't use a script-based font if we were designing a news site, as the text should be clean and easy to read. However, a script font would be perfect to represent the flowing lines associated with dresses sold at a dressmaker's outfit.

It's all about selecting the right style; Less is perfect to help us manage the styles, colors, and sizes of any font we decide to use in our pages. Throughout this chapter, you'll see how you can use some simple principles to make managing fonts a cinch with Less. We will cover the following topics:

  • Creating font mixins

  • Using variables to determine sizes...