3 .opacity(@opacity:0.5) {
5 @opacityie: @opacity * 100;
6 filter: ~"alpha(opacity=@{opacityie})";
10 .vertical-gradient(@startColor: #FDFDFD, @endColor: #DDD) {
11 background-color: mix(@startColor, @endColor, 60%);
12 background-image: -moz-linear-gradient(top, @startColor, @endColor); // FF 3.6+
13 background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+
14 background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+
15 background-image: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10
16 background-image: linear-gradient(to bottom, @startColor, @endColor); // Standard, IE10
17 background-repeat: repeat-x;
18 filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@startColor),argb(@endColor)));
22 .border-radius(@radius:3px) {
23 -webkit-border-radius: @radius;
24 -moz-border-radius: @radius;
25 border-radius: @radius;
28 .box-shadow(@shadowA:#ccc 5px 5px 5px, @shadowB:X, ...){
29 // Multiple shadow solution from http://toekneestuck.com/blog/2012/05/15/less-css-arguments-variable/
30 @props: ~`"@{arguments}".replace(/[\[\]]|\,\sX/g, '')`;
31 -webkit-box-shadow: @props;
32 -moz-box-shadow: @props;
36 .transition(@transition) {
37 -webkit-transition: @transition;
38 transition: @transition;
42 display: inline-block;
50 filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)"));
51 background: transparent;
54 .button-background(@startColor, @endColor, @textColor: #fff, @textShadow: 0 -1px 0 rgba(0,0,0,.25)) {
56 text-shadow: @textShadow;
57 .vertical-gradient(@startColor, @endColor);
58 border-color: @endColor @endColor darken(@endColor, 15%);
59 border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fadein(rgba(0,0,0,.1), 15%);