less syntax синтаксис
@red: red;
@border: 1px solid red;
h1 {
color: @red;
border: @border;
}
.btn() {
background: blue;
}
.btn-header {
btn;
.transition();
font-size: 20px;
}
.transition(@prop: all; @timing: .2s, @effect: linear) {
transition: @prop @timing @effect;
}
.linear_gradient(@direction, @bg_top, @bg_bottom) {
background: linear-gradient(@direction, @bg_top, @bg_bottom);
}
a {
color: red;
&:hover { color: green; }
& span {font-weight: bold; }
}