9. Mixins With Multiple Parameters
• Parameters are either semicolon or comma
separated. It is recommended to use semicolon.
• The symbol comma has double meaning:
o It can be interpreted either as a mixin parameters
separator
o As css list separator.
10. Mixins With Multiple Parameters
• two arguments and each contains comma
separated list
14. Mixins With Multiple Parameters
• It is legal to define multiple mixins with the same
name and number of parameters. Less will use
properties of all that can apply.
15. The Keyword !important
• Use the !important keyword after mixin call to mark
all properties brought by it as !important:
16. Mixin Guards
• Guards are useful when you want to match on
expressions, as opposed to simple values or arity.
• The full list of comparison operators usable in guards
are: > >= = =< <
17. Mixin Guards
• Guards can be separated with a comma ‘,’–if any
of the guards evaluates to true, it’s considered as a
match:
• if you want to match mixins based on value type,
you can use the is* functions:
18. Mixin Guards
• Here are the basic type checking functions:
o
o
o
o
o
iscolor
isnumber
isstring
iskeyword
Isurl
• If you want to check if a value, in addition to being
a number, is in a specific unit, you may use one of:
o
o
o
o
ispixel
ispercentage
isem
isunit
21. Extend
• As of version 1.4, LESS supports extending a style.
• it adds the extending selector to the selector list for
output of the extended class.
• The syntax for extend is designed to mimic the
syntax of CSS pseudo-classes, and can be
combined with pseudo-classes as long as any
extends selectors come last.
22. Namespaces
• If you want to mixin properties inside a more
complicated selector, you can stack up multiple id's
or classes.
• again the > is optional
25. Selector Interpolation
• If you want to use LESS variables inside selectors,
you can do this by referencing the variable using
@{selector} as in string interpolation. For example: