-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_gradients.less
More file actions
64 lines (57 loc) · 2.67 KB
/
Copy path_gradients.less
File metadata and controls
64 lines (57 loc) · 2.67 KB
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
/**
* less css: GRADIENTS
*
* @section lesscss-mixins
* @subsection gradients
* @author Jasper Moelker <J.B.Moelker@ActiveIDs.nl>
*/
/**
* @function .linearGradient
* @param {String} color1 hexidecimal value or color alias, defaults to black
* @param {String} color2 hexidecimal value or color alias, defaults to white
* @return cross browser linear gradient
*/
.linearGradient(@color1:#000000, @color2:#FFFFFF)
{
background: -moz-linear-gradient( @color1, @color2);
background: -webkit-gradient(linear, left top, left bottom, from( @color1), to(@color2));
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=@color1, endColorstr=@color2);
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=@color1, endColorstr=@color2)";
.backgroundClip();
}
/**
* linear gradient with pie htc fallback for IE
* @function .linearGradientPie
* @param {String} color1 hexidecimal value or color alias, defaults to black
* @param {String} color2 hexidecimal value or color alias, defaults to white
* @param {String} lgd angle for gradient, defaults to 90deg
* @param {String} wkd1 gradient starting point, defaults to left top
* @param {String} wkd2 gradient end point, defaults to left bottom
* @return cross browser linear gradient
*/
.linearGradientPie(@color1:#000000, @color2:#FFFFFF, @lgd:90deg, @wkd1:left top, @wkd2:left bottom)
{
background: -moz-linear-gradient(@lgd, @color1, @color2);
background: -webkit-gradient(linear, @wkd1, @wkd2, from(@color1), to(@color2));
*position: relative;
*z-index: 1;
*zoom: 1;
-pie-background: linear-gradient(@lgd, @color2, @color1);
.backgroundClip();
}
/**
* @function .boxGradient
* @param {String} color1 hexidecimal value or color alias, defaults to black
* @param {String} color2 hexidecimal value or color alias, defaults to white
* @return cross browser box gradient
*/
.boxGradient(@color1:#000000, @color2:#FFFFFF)
{
background-color: @color1;
background-image: -webkit-gradient(linear, left top, left bottom, from(@color1), to(@color2)); /* Saf4+, Chrome */
background-image: -webkit-linear-gradient(top, @color1, @color2); /* Chrome 10+, Saf5.1+, iOS 5+ */
background-image: -moz-linear-gradient(top, @color1, @color2); /* FF3.6 */
background-image: -ms-linear-gradient(top, @color1, @color2); /* IE10 */
background-image: -o-linear-gradient(top, @color1, @color2); /* Opera 11.10+ */
background-image: linear-gradient(top, @color1, @color2);
}