Join Joe Marini for an in-depth discussion in this video Using built-in functions, part of CSS with LESS and Sass.
The LESS library provides a host of functions for working with some common situations you're…going to find yourself in when using some of the features of LESS.…So, for example, there's a whole bunch of color functions that you can use to both manipulate…and extract values of colors.…So, for example, if you wanted to take a color, and make it lighter or darker, you could use…the lighten or darken functions.…There are functions for controlling the saturation level of colors.…You can affect the alpha transparency of colors using the fade functions; you see fadein, and…fadeout, and fade there.…
You can also use the spin function, which will take a color, and then spin it a certain number…of degrees on the color wheel to come up with a new color.…And then finally, you can mix two colors together with the mix function.…You can also use functions to extract values from certain colors.…So, for example, you can use the hue, saturation, lightness, and alpha functions that, when given…a color, will convert that color to the HSL space, and then give you the value based upon…
The first section focuses on LESS (Leaner CSS) and how it can be used on both the client and the server. The lessons show how to work with variables, mixins, nested rules, and other features to easily create maintainable CSS.
The second section introduces Sass (Syntactically awesome stylesheets), which contains many of the same features as LESS, along with a few new ones. Joe also compares and contrasts the two tools, and explains how your platform and needs may influence which tool you choose.
- What are LESS and Sass?
- Using variables in your CSS
- Working with reusable and parameterized mixins
- Implementing nested rules
- Combining CSS rules with operations
- Using the built-in functions in LESS and Sass
- Controlling the CSS output formatting
- Importing external files