Book Image

LESS WEB DEVELOPMENT COOKBOOK

Book Image

LESS WEB DEVELOPMENT COOKBOOK

Overview of this book

Table of Contents (19 chapters)
Less Web Development Cookbook
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Introduction


In Less, you can use the & sign as a reference to the parent selector in the case of nested selectors. This reference can not only be used to create style rules for the CSS pseudo classes, but can also be used in combination with Less's :extend() pseudo class. This pseudo class merges the attached class with all the appearances of the classes to extend. In this chapter, you will find some use cases of the & sign referencing in Less, and you will learn how to use the :extend() pseudo class.

Note that this chapter only handles the referencing and merging of selectors. Less also enables you to merge property values. The merging of property values will be described in the Aggregating values under a single property recipe in Chapter 6, Advanced Less Coding.