1
+ .gradient (@color : #F5F5F5 , @start : #EEE , @stop : #FFF ) {
2
+ background : @color ;
3
+ background : -webkit-gradient (linear , left bottom , left top , color - stop(0 , @start ), color - stop(1 , @stop ));
4
+ background : -ms-linear-gradient (bottom ,@start ,@stop );
5
+ background : -moz-linear-gradient (center bottom ,@start 0% ,@stop 100% );
6
+ background : -o-linear-gradient (@stop ,@start );
7
+ filter : e (%(" progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)" , @stop , @start ));
8
+ }
9
+
10
+ .bw-gradient (@color : #F5F5F5 , @start : 0 , @stop : 255 ) {
11
+ background : @color ;
12
+ background : -webkit-gradient (linear , left bottom , left top , color - stop(0 , rgb (@start ,@start ,@start )), color - stop(1 , rgb (@stop,@stop,@stop)));
13
+ background : -ms-linear-gradient (bottom , rgb (@start ,@start ,@start ) 0% , rgb (@stop,@stop,@stop) 100% );
14
+ background : -moz-linear-gradient (center bottom , rgb (@start ,@start ,@start ) 0% , rgb (@stop,@stop,@stop) 100% );
15
+ background : -o-linear-gradient (rgb (@stop,@stop,@stop), rgb (@start ,@start ,@start ));
16
+ background : linear-gradient (rgb (@stop,@stop,@stop), rgb (@start ,@start ,@start ));
17
+
18
+ filter : e (%(" progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)" ,rgb (@stop,@stop,@stop), rgb (@start ,@start ,@start )));
19
+ }
20
+
21
+ .linear-gradient (@color , @gradient ) {
22
+ background : @color ;
23
+ background : -moz-linear-gradient (@gradient );
24
+ background : -webkit-linear-gradient (@gradient );
25
+ background : -o-linear-gradient (@gradient );
26
+ background : -ms-linear-gradient (@gradient );
27
+ background : linear-gradient (@gradient);
28
+ }
29
+
30
+ .bordered (@top-color : #EEE , @right-color : #EEE , @bottom-color : #EEE , @left-color : #EEE ) {
31
+ border-top : solid 1px @top-color ;
32
+ border-left : solid 1px @left-color ;
33
+ border-right : solid 1px @right-color ;
34
+ border-bottom : solid 1px @bottom-color ;
35
+ }
36
+
37
+ .drop-shadow (@x-axis : 0 , @y-axis : 1px , @blur : 2px , @alpha : 0.1 ) {
38
+ -webkit-box-shadow : @x-axis @y-axis @blur rgba (0 , 0 , 0 , @alpha );
39
+ -moz-box-shadow : @x-axis @y-axis @blur rgba (0 , 0 , 0 , @alpha );
40
+ box-shadow : @x-axis @y-axis @blur rgba (0 , 0 , 0 , @alpha );
41
+ }
42
+
43
+ .box-shadow (@shadow ) {
44
+ -webkit-box-shadow : @shadow ;
45
+ -moz-box-shadow : @shadow ;
46
+ box-shadow : @shadow ;
47
+ }
48
+
49
+ .rounded (@radius : 2px ) {
50
+ -webkit-border-radius : @radius ;
51
+ -moz-border-radius : @radius ;
52
+ border-radius : @radius ;
53
+ }
54
+
55
+ .border-radius (@topright : 0 , @bottomright : 0 , @bottomleft : 0 , @topleft : 0 ) {
56
+ -webkit-border-top-right-radius : @topright ;
57
+ -webkit-border-bottom-right-radius : @bottomright ;
58
+ -webkit-border-bottom-left-radius : @bottomleft ;
59
+ -webkit-border-top-left-radius : @topleft ;
60
+ -moz-border-radius-topright : @topright ;
61
+ -moz-border-radius-bottomright : @bottomright ;
62
+ -moz-border-radius-bottomleft : @bottomleft ;
63
+ -moz-border-radius-topleft : @topleft ;
64
+ border-top-right-radius : @topright ;
65
+ border-bottom-right-radius : @bottomright ;
66
+ border-bottom-left-radius : @bottomleft ;
67
+ border-top-left-radius : @topleft ;
68
+ .background-clip (padding-box );
69
+ }
70
+
71
+ .opacity (@opacity : 0.5 ) {
72
+ -moz-opacity : @opacity ;
73
+ -khtml-opacity : @opacity ;
74
+ -webkit-opacity : @opacity ;
75
+ opacity : @opacity ;
76
+ @opperc : @opacity * 100 ;
77
+ -ms-filter : ~ " progid:DXImageTransform.Microsoft.Alpha(opacity=@{opperc} )" ;
78
+ filter : ~ " alpha(opacity=@{opperc} )" ;
79
+ }
80
+
81
+ .transition-duration (@duration : 0.2s ) {
82
+ -moz-transition-duration : @duration ;
83
+ -webkit-transition-duration : @duration ;
84
+ -o-transition-duration : @duration ;
85
+ transition-duration : @duration ;
86
+ }
87
+
88
+ .transform (...) {
89
+ -webkit-transform : @arguments ;
90
+ -moz-transform : @arguments ;
91
+ -o-transform : @arguments ;
92
+ -ms-transform : @arguments ;
93
+ transform : @arguments ;
94
+ }
95
+
96
+ .rotation (@deg :5deg ) {
97
+ .transform (rotate (@deg ));
98
+ }
99
+
100
+ .scale (@ratio :1.5 ) {
101
+ .transform (scale (@ratio ));
102
+ }
103
+
104
+ .transition (@duration :0.2s , @on : all , @ease :ease ) {
105
+ -webkit-transition : @on @duration @ease ;
106
+ -moz-transition : @on @duration @ease ;
107
+ -o-transition : @on @duration @ease ;
108
+ transition : @on @duration @ease ;
109
+ }
110
+
111
+ .inner-shadow (@horizontal :0 , @vertical :1px , @blur :2px , @alpha : 0.4 ) {
112
+ -webkit-box-shadow : inset @horizontal @vertical @blur rgba (0 , 0 , 0 , @alpha );
113
+ -moz-box-shadow : inset @horizontal @vertical @blur rgba (0 , 0 , 0 , @alpha );
114
+ box-shadow : inset @horizontal @vertical @blur rgba (0 , 0 , 0 , @alpha );
115
+ }
116
+
117
+ .box-sizing (@sizing : border-box ) {
118
+ -ms-box-sizing : @sizing ;
119
+ -moz-box-sizing : @sizing ;
120
+ -webkit-box-sizing : @sizing ;
121
+ box-sizing : @sizing ;
122
+ }
123
+
124
+ .user-select (@argument : none ) {
125
+ -webkit-user-select : @argument ;
126
+ -moz-user-select : @argument ;
127
+ -ms-user-select : @argument ;
128
+ user-select : @argument ;
129
+ }
130
+
131
+ .columns (@colwidth : 250px , @colcount : 0 , @colgap : 50px , @columnRuleColor : #EEE , @columnRuleStyle : solid , @columnRuleWidth : 1px ) {
132
+ -moz-column-width : @colwidth ;
133
+ -moz-column-count : @colcount ;
134
+ -moz-column-gap : @colgap ;
135
+ -moz-column-rule-color : @columnRuleColor ;
136
+ -moz-column-rule-style : @columnRuleStyle ;
137
+ -moz-column-rule-width : @columnRuleWidth ;
138
+ -webkit-column-width : @colwidth ;
139
+ -webkit-column-count : @colcount ;
140
+ -webkit-column-gap : @colgap ;
141
+ -webkit-column-rule-color : @columnRuleColor ;
142
+ -webkit-column-rule-style : @columnRuleStyle ;
143
+ -webkit-column-rule-width : @columnRuleWidth ;
144
+ column-width : @colwidth ;
145
+ column-count : @colcount ;
146
+ column-gap : @colgap ;
147
+ column-rule-color : @columnRuleColor ;
148
+ column-rule-style : @columnRuleStyle ;
149
+ column-rule-width : @columnRuleWidth ;
150
+ }
151
+
152
+ .translate (@x :0 , @y :0 ) {
153
+ .transform (translate (@x , @y ));
154
+ }
155
+
156
+ .background-clip (@argument : padding-box ) {
157
+ -moz-background-clip : @argument ;
158
+ -webkit-background-clip : @argument ;
159
+ background-clip : @argument ;
160
+ }
161
+
162
+ .clearfix () {
163
+ zoom : 1 ;
164
+ & :before {
165
+ content : ' ' ;
166
+ display : block ;
167
+ }
168
+ & :after {
169
+ content : ' ' ;
170
+ display : table ;
171
+ clear : both ;
172
+ }
173
+ }
0 commit comments