This repository was archived by the owner on Feb 9, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathborders.less
80 lines (70 loc) · 2.66 KB
/
borders.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
// Borders
// =========
// less mixins related to borders etc.
// In this file
// ------------
// * Borders with rounded corners
// * Borders with Individually rounded corners
// * Borders with multipe colors
// * Borders with indivdually specified sizes
// Borders with rounded corners
// ----------------------------
// ```less
.border-radius (@radius: 4px) {
-webkit-border-radius : @radius;
-moz-border-radius : @radius;
border-radius : @radius;
-moz-background-clip : padding;
-webkit-background-clip : padding-box;
background-clip : padding-box;
}
// ```
// Borders with Individually rounded corners
// -----------------------------------------
// ```less
.individual-border-radius(@topright: 0, @bottomright: 0, @bottomleft: 0, @topleft: 0) {
-webkit-border-top-right-radius : @topright;
-webkit-border-bottom-right-radius : @bottomright;
-webkit-border-bottom-left-radius : @bottomleft;
-webkit-border-top-left-radius : @topleft;
-moz-border-radius-topright : @topright;
-moz-border-radius-bottomright : @bottomright;
-moz-border-radius-bottomleft : @bottomleft;
-moz-border-radius-topleft : @topleft;
border-top-right-radius : @topright;
border-bottom-right-radius : @bottomright;
border-bottom-left-radius : @bottomleft;
border-top-left-radius : @topleft;
-moz-background-clip : padding;
-webkit-background-clip : padding-box;
background-clip : padding-box;
}
// ```
// Borders with multipe colors
// ---------------------------
// ```less
.multi-color-border(@top, @sides, @bottom) {
border-top : 1px solid @top;
border-left : 1px solid @sides;
border-right : 1px solid @sides;
border-bottom : 1px solid @bottom;
}
/// ```
// Borders with indivdually specified sizes
// --------------------------------------
// ```less
.multi-border-radius(@topLeft: 5px, @topRight: 5px, @bottomRight: 5px, @bottomLeft: 5px) {
-webkit-border-top-left-radius : @topLeft;
-webkit-border-top-right-radius : @topRight;
-webkit-border-bottom-right-radius : @bottomRight;
-webkit-border-bottom-left-radius : @bottomLeft;
-moz-border-radius-topleft : @topLeft;
-moz-border-radius-topright : @topRight;
-moz-border-radius-bottomright : @bottomRight;
-moz-border-radius-bottomleft : @bottomLeft;
border-top-left-radius : @topLeft;
border-top-right-radius : @topRight;
border-bottom-right-radius : @bottomRight;
border-bottom-left-radius : @bottomLeft;
}
/// ```