Block shadow using vendor prefixes in LESS
Let's make a function that will add a cross-browser shadow to the block:
.shadow(@s) {
-moz-shadow+: @s;
-webkit-shadow+: @s;
box-shadow+: @s;
}
Let's use the created function:
p {
.shadow(1px 10x red);
.shadow(2px 3px blue);
}
Let's look at the compilation result:
p {
-moz-shadow: 1px 10x red, 2px 3px blue;
-webkit-shadow: 1px 10x red, 2px 3px blue;
box-shadow: 1px 10x red, 2px 3px blue;
}