Less
example
@base:#f938ab; .box-shadow(@style, @c) when(iscolor(@c)){ -webkit-box-shadow:@style @c; box-shadow:@style @c; } .box-shadow(@sytle,@alpha:50%) when(isnumber(@alpha)){ .box-shadow(@style,rgba(0,0,0,@alpha)); } .box{ color:saturate(@base,5%); border-color:lighten(@base,30%); div{.box-shaow(0 0 5px 30%)} }
- Language features
2.1 Variables
@nice-blue:#979699;
@light-blue:@nice-blue+111;
#header{
color:@light-blue;
}
2.2 Mixins
.borderd{
border-top:dotted 1px black;
border-bottom:solid 2px black;
}
#menu a{
color:#111;
.bordered;
}
.post a{
color:red;
.bordered;
}
2.3 Nested Rules
#header{
color:black;
.navigation{
font-size:12px;
}
.logo{
width:300px;
}
}
.clearfix{
display:block;
zoom:1;
&:after{
content:"";
display:block;
font-size:0;
height:0;
clear:both;
visibility:hidden;
}
}