-
Notifications
You must be signed in to change notification settings - Fork 0
/
_border-radius.less
72 lines (60 loc) · 2.21 KB
/
_border-radius.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
/**
* less css: BORDER RADIUS
*
* @section lesscss-mixins
* @subsection border-radius
* @author Jasper Moelker <[email protected]>
*/
/**
* @function .borderRadius
* @type {Number|String} radius as value with unit (eg. 10px, .1em)
* @return cross browser border radius
*/
.borderRadius(@radius:5px)
{
-moz-border-radius: @radius;
-webkit-border-radius: @radius;
border-radius: @radius;
.backgroundClip(); // prevents background color from leaking outside border.
}
/**
* create cross browser border radius with pie htc fallback for IE
* @function .borderRadiusPie
* @type {Number|String} radius as value with unit (eg. 10px, .1em)
* @return cross browser border radius
*/
.borderRadiusPie(@radius:5px)
{
-moz-border-radius: @radius;
-webkit-border-radius: @radius;
border-radius: @radius;
*position : relative;
*z-index : 1;
*zoom : 1;
behavior : url(PIE.htc);
.backgroundClip(); // prevents background color from leaking outside border.
}
/**
* @function .borderRadiusCorners
* @param {Number|String} tl top left corner radius, defaults to zero
* @param {Number|String} tr top right corner radius, defaults to zero
* @param {Number|String} bl bottom left corner radius, defaults to zero
* @param {Number|String} br bottom right corner radius, defaults to zero
* @return cross browser border radius
*/
.borderRadiusCorners(@tl:0,@tr:0,@bl:0,@br:0)
{
-moz-border-radius-topleft: @tl;
-webkit-border-top-left-radius: @tl;
border-top-left-radius: @tl;
-moz-border-radius-topright: @tr;
-webkit-border-top-right-radius: @tr;
border-top-right-radius: @tr;
-moz-border-radius-bottomleft: @bl;
-webkit-border-bottom-left-radius: @bl;
border-bottom-left-radius: @bl;
-moz-border-radius-bottomright: @br;
-webkit-border-bottom-right-radius: @br;
border-bottom-right-radius: @br;
.backgroundClip(); // prevents background color from leaking outside border.
}