-
Notifications
You must be signed in to change notification settings - Fork 3
/
CSS3.less
90 lines (81 loc) · 2.82 KB
/
CSS3.less
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/* CSS3.less initiated by ruben.stolk@changer.nl
Use as you like
*/
@color: #000;
@shadow: #ccc;
.pie
{
behavior: url(PIE.htc);
}
.radius(@radiustl: 5px, @radiustr: 5px, @radiusbr: 5px, @radiusbl: 5px)
{
border-radius: @radiustl @radiustr @radiusbr @radiusbl;
-moz-border-radius: @radiustl @radiustr @radiusbr @radiusbl;
-webkit-border-radius: @radiustl @radiustr @radiusbr @radiusbl;
-ms-border-radius: @radiustl @radiustr @radiusbr @radiusbl;
.pie;
border-top-left-radius: @radiustl;
-moz-border-top-left-radius: @radiustl;
-webkit-border-top-left-radius: @radiustl;
-ms-border-top-left-radius: @radiustl;
border-top-right-radius: @radiustr;
-moz-border-top-right-radius: @radiustr;
-webkit-border-top-right-radius: @radiustr;
-ms-border-top-right-radius: @radiustr;
border-bottom-right-radius: @radiusbr;
-moz-border-bottom-right-radius: @radiusbr;
-webkit-border-bottom-right-radius: @radiusbr;
-ms-border-bottom-right-radius: @radiusbr;
border-bottom-left-radius: @radiusbl;
-moz-border-bottom-left-radius: @radiusbl;
-webkit-border-bottom-left-radius: @radiusbl;
-ms-border-bottom-left-radius: @radiusbl;
}
.radius-all(@radius: 5px)
{
.radius(@radius, @radius, @radius, @radius);
}
.gradient(@start, @end)
{
background-color: @start;
background: @start;
background: -webkit-gradient(linear, left top, left bottom, from(@start), to(@end));
background: -webkit-linear-gradient(top, @start, @end);
background: -moz-linear-gradient(top, @start, @end);
background: -ms-linear-gradient(top, @start, @end);
background: -o-linear-gradient(top, @start, @end);
background: linear-gradient(top, @start, @end);
filter: formatString("progid:DXImageTransform.Microsoft.gradient(startColorstr={0}, endColorstr={1}, gradientType=0)", @start, @end);
}
.gradient-horizontal(@start, @middle, @end)
{
background: @start;
background: -moz-linear-gradient(@start, @middle, @end);
background: -webkit-gradient(linear, left top, right top, from(@start), color-stop(50%, @middle), to(@end));
filter: formatString("progid:DXImageTransform.Microsoft.gradient(startColorstr={0}, endColorstr={1}, gradientType=1)", @start, @middle);
}
.text-shadow(@color, @hor: 1px, @ver: 1px, @blur: 2px)
{
text-shadow: @hor @ver @blur @color;
}
.box-shadow(@color: @shadow, @hor: 3px, @ver: 3px, @blur: 15px, @spread: 2px)
{
-webkit-box-shadow: @hor @ver @blur @spread @color;
-moz-box-shadow: @hor @ver @blur @spread @color;
box-shadow: @hor @ver @blur @spread @color;
.pie;
}
.scale(@scale: 2, @hor: 'center', @ver: 'center')
{
-webkit-transform: scale(@scale);
-webkit-transform-origin: @hor @ver;
-moz-transform: scale(@scale);
-moz-transform-origin: @hor @ver;
-ms-transform: scale(@scale);
-ms-transform-origin: @hor @ver;
-o-transform: scale(@scale);
-o-transform-origin: @hor @ver;
transform: scale(@scale);
transform-origin: @hor @ver;
zoom: @scale;
}