-
Notifications
You must be signed in to change notification settings - Fork 1
/
utils.less
110 lines (96 loc) · 2.28 KB
/
utils.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
// function border radius
.border-radius (@radius: 5px) {
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
-ms-border-radius: @radius;
-o-border-radius: @radius;
border-radius: @radius;
}
// Geometrical shapes
.square(@size, @color) {
height: @size;
width: @size;
background-color: @color;
}
.circle(@size, @color) {
height: @size;
width: @size;
.border-radius(50%);
}
.bottom-triangle(@color: #fff) {
content: "";
height: 0;
width: 0;
position: absolute;
border: 15px solid transparent;
border-top-color: @color;
margin-left: 35px; //set these as per requirement.
margin-top: 65px; // set these as per requirement.
}
.right-triangle(@color: #eee) {
.parent-container:before {
width: 0;
height: 0;
position: absolute;
right: -10px;
top: 30px;
content: "";
border-top: 20px solid transparent;
border-bottom: 20px solid transparent;
border-left: 20px solid @color;
}
}
.container-padding(@width:0px) {
padding-left: @width;
padding-right: @width;
}
.button-color(@font:24px, @padding:30px, @color) {
background-color: @color;
font-size: @font;
font-weight: bold;
color: white;
padding-left: @padding;
padding-right: @padding;
}
.container-margin(@value:30px) {
margin-top: @value;
margin-bottom: @value;
}
//circle with a central texts
.small-circle(@color, @radius, @color-point: #fff) {
.circle(@radius, @color);
display: inline-block;
vertical-align: middle;
margin-bottom: 10px;
background-color: @color;
.point { // class of the text
color: @color-point;
font-weight: bold;
padding: 24px;
font-size: 24px;
line-height: 24px;
text-align: center;
}
}
.dialog-box(@padding, @radius, @width) {
padding: @padding;
background-color: @gray-lighter;
.border-radius(@radius);
max-width: @width;
}
.container-widget(@background: #fff){
background: @background;
.box-shadow(0 2px 6px darken(@gray-light, 10%));
}
.top-border-radius(@radius) {
border-top-right-radius: @radius;
border-top-left-radius: @radius;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.bottom-border-radius(@radius) {
border-top-right-radius: 0;
border-top-left-radius: 0;
border-bottom-right-radius: @radius;
border-bottom-left-radius: @radius;
}