What this book covers
Chapter 1, Introducing Less, takes us through the roles that both HTML and CSS play, and examines the inherent limitations of using CSS as a technology. We begin our journey by taking a look at the role CSS preprocessors play and how using Less can act as a solution for some of these limiting issues.
Chapter 2, Building a Less Development Toolkit, is where we get to know Less for the first time, with a look at how we can incorporate it in our code, explore its syntax, and create some basic styles. We'll take a look at the different ways of compiling Less into valid CSS and why it is best to precompile code rather than use it dynamically in the browser.
Chapter 3, Getting Started with Less, delves into the wide range of tools and applications that are available and can be useful for working with Less; the chapter will provide some hints and tips on how to build an effective toolkit for working with Less, which you can integrate into your own development workflow.
Chapter 4, Working with Variables, Mixins, and Functions, continues from where we left off in Chapter 2, Building a Less Development Toolkit, with a look at one of the key concepts of Less, in the form of mixins. We'll take a look at this incredibly powerful tool, which will help you to save a lot of time when developing Less; we will also cover how we can create variables and functions to create our CSS styling when working with Less.
Chapter 5, Inheritance, Overriding, and Nesting in Less, examines how, with a little forethought and careful design, we can use the power of Less to create new styles based on existing ones, but without the need to duplicate the existing code. We'll also see how Less allows us to split style sheets into smaller, more manageable files, where we can group common styles together, making it easier to manage our development.
Chapter 6, Migrating Your Site to Less, contains the answer to the question asked by many developers when starting with Less: how can I incorporate it into existing sites? We'll take a look at some of the tips and tricks that we can use to gradually transition a site to use Less while still maintaining the existing CSS until it has been converted to its Less equivalent.
Chapter 7, Manipulating Fonts with Less, examines how, with some simple tricks, we can easily maintain any font style used within our site with the help of Less; we'll see how, with a little care and planning, we can make minimal changes that will quickly update font styles throughout the whole site.
Chapter 8, Media Queries with Less, takes a look at how we can use Less to quickly and effectively construct responsive sites using the power of media queries. We'll take a brief look at how media queries work and then move on to take a look at how we need to set expectations with clients and decide what should be supported, before using Less to build our queries.
Chapter 9, Working with Less in a CMS, takes us through how Less can be used to great effect when managing styles for any content management system available today. In this chapter, we'll use WordPress as our example to see how Less can first be incorporated directly in code or by using plugins. We'll then move on to the conversion process, with a look at how to transition a WordPress site to use Less, and how we can remove the need to manually compile styles with the use of a Grunt plugin.
Chapter 10, Using Bootstrap with Less, continues our journey through frameworks with a look at the popular Bootstrap system and how it uses Less to create its styles. We'll take a look at its file structure and some of the mixins it uses before configuring it for use on a demo web page as a part of developing a workflow for using Bootstrap with Less.
Chapter 11, Abstracting CSS Frameworks with Less, illustrates one of the pitfalls of using frameworks, where the supplied code can be nonsemantic and inefficient. In this chapter, we'll learn why frameworks aren't always the answer to everything and that they can make it hard to transition to a different solution if we want to change. We'll take a look at how we can use Less to help simplify complex styles, keep our HTML clean, and ultimately make frameworks work for us, and not the other way around.
Chapter 12, Color Processing with Less, covers one of the most important aspects of any website—colors! CSS styling can make maintaining colors difficult. In this chapter, we'll take a look at how we can bring the power of image processing to our CSS development with the use of Less. We'll also learn how, with a little care, we can begin to reduce our reliance on graphic packages such as Photoshop as part of our development workflow.
Chapter 13, Animation with Less, takes us on a journey to show how Less can be used to help simplify the pain experienced when animating elements and objects on a web page. In this chapter, we'll see how animations work, briefly cover the different types of animations available, and see how Less can simplify the markup, before taking a look at using our skills to produce a simple animated menu that could be used on any site.
Chapter 14, Extending and Contributing to Less, is the concluding chapter in our journey through the world of Less with a look at how we can give back to the project and help develop the library further. We'll see how to report bugs, where to find the documentation for the library, and contribute any code fixes or improvements to the library.
Appendix, Color Functions in Less, lists details of each function, within four groups of defining color formats, channeling colors, performing color operations, and blending colors.