-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_shadows.less
87 lines (75 loc) · 3.02 KB
/
_shadows.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
/**
* less css: SHADOWS
*
* @section lesscss-mixins
* @subsection shadows
* @author Jasper Moelker <[email protected]>
*/
/**
* @method .boxShadow
* @param {Number|String} x horizontal offset, eg. 5px
* @param {Number|String} y vertical offset, eg. 5px
* @param {Number|String} blur blur radius, defaults to 0
* @param {Number|String} spread spread radius, defaults to 0
* @param {String} color shadow color, defaults to black
* @return cross browser box shadow
*/
.boxShadow(@x, @y, @blur:0, @spread:0, @color:#000)
{
@box-shadow: @x @y @blur @spread @color;
-moz-box-shadow: @box-shadow;
-webkit-box-shadow: @box-shadow;
box-shadow: @box-shadow;
}
/**
* box shadow with pie htc fallback for IE
* @method .boxShadowPie
* @param {Number|String} x horizontal offset, eg. 5px
* @param {Number|String} y vertical offset, eg. 5px
* @param {Number|String} blur blur radius, defaults to 0
* @param {Number|String} spread spread radius, defaults to 0
* @param {String} color shadow color, defaults to black
* @param {Boolean} inset defaults to false
* @return cross browser box shadow
*/
.boxShadowPie(@x:5px, @y:5px, @blur:8px, @spread:0px, @color:#555, @inset){
@box-shadow: @inset @x @y @blur @spread @color;
-moz-box-shadow: @box-shadow;
-webkit-box-shadow: @box-shadow;
box-shadow: @box-shadow;
*position: relative;
*z-index: 1;
*zoom: 1;
behavior: url(PIE.htc);
}
/**
* @method .textShadow
* @param {String} color shadow color, defaults to gray
* @param {Number|String} x horizontal offset, eg. 5px
* @param {Number|String} y vertical offset, eg. 5px
* @param {Number|String} blur blur radius, defaults to 0
* @return cross browser text shadow
*/
.textShadow(@color:#555, @x:2px, @y:2px, @blur:3px){
@text-shadow: @color @x @y @blur;
-moz-text-shadow: @text-shadow;
-webkit-text-shadow: @text-shadow;
text-shadow: @text-shadow;
}
/**
* @method .textShadowFilter
* @param {String} color shadow color, defaults to gray
* @param {Number|String} x horizontal offset, eg. 5px
* @param {Number|String} y vertical offset, eg. 5px
* @param {Number|String} blur blur radius, defaults to 0
* @return cross browser text shadow with IE filter
*/
.textShadowFilter(@color:#555, @x:2px, @y:2px, @blur:3px){
@text-shadow: @color @x @y @blur;
-moz-text-shadow: @text-shadow;
-webkit-text-shadow: @text-shadow;
text-shadow: @text-shadow;
filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=@x, OffY=y, Color='@color', Positive='true');
-ms-filter: "progid:DXImageTransform.Microsoft.dropshadow(OffX=@x, OffY=y, Color='@color', Positive='true')";
*zoom: 1;
}