Less 最基本和重要的概念:
变量、扩展、混合(带参数的混合、作为函数使用的混合、传递规则集给混合)
第一条:extend VS mixin:
nav ul {
&:extend(.inline);
background: blue;
}
.inline {
color: red;
}
// output
nav ul {
background: blue;
}
.inline,
nav ul {
color: red;
}
.my-mixin {
color: black;
}
.my-other-mixin() {
background: white;
}
.class {
.my-mixin;
.my-other-mixin;
}
// output
.my-mixin {
color: black;
}
.class {
color: black;
background: white;
}