-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhelpers.less
225 lines (195 loc) · 5.4 KB
/
helpers.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
/* CSS Helpers v1.3.1 */
/* Fonts
============================================================== */
@Arial: Arial, Helvetica, sans-serif;
@Lucida: "Lucida Sans Unicode", "Lucida Sans", "Lucida Sans Regular", "Lucida Grande", "Trebuchet MS", Arial, sans-serif;
@Myriad: "Myriad Pro", MyriadPro, "Myriad Pro Regular", "MyriadPro-Regular", Calibri, Arial, Helvetica, sans-serif;
@Segoe: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
@Tahoma: Tahoma, Geneva, Verdana, sans-serif;
@Trebuchet: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Sans", "Lucida Sans Regular", "Lucida Grande", Arial, sans-serif;
@Verdana: Verdana, Geneva, Tahoma, sans-serif;
@Cambira: Cambira, Cochin, Georgia, "Times New Roman", Times, serif;
@Georgia: Georgia, "Times New Roman", Times, serif;
@Times: "Times New Roman", Times, serif;
@Consolas: Consolas, "Courier New", Courier, monospace;
@Courier: "Courier New", Courier, monospace;
/* General
============================================================== */
// http://stackoverflow.com/questions/211383/what-methods-of-clearfix-can-i-use
// http://cssmojo.com/the-very-latest-clearfix-reloaded/
.g-clr {
clear: both;
display: block;
}
.g-clrfix {
zoom: 1;
&:after {
content: " "; /* Space is needed for old Opera support */
display: block; /* display:table works as well, but prevents margin collapsing for the clrfix-block */
clear: both;
}
}
.g-bold { font-weight: bold; }
.g-italic { font-style: italic; }
.g-underline { text-decoration: underline; }
.g-none { display: none; }
.g-inline { display: inline; }
.g-block { display: block; }
.g-inlineBlock { display: inline-block; }
.g-left { text-align: left; }
.g-right { text-align: right; }
.g-center { text-align: center; }
.g-justify { text-align: justify; }
.g-floatLeft { float: left; }
.g-floatRight { float: right; }
.g-floatNone { float: none; }
.g-default { cursor: default; }
.g-pointer { cursor: pointer; }
.g-text { cursor: text; }
//noinspection CssUnknownProperty
.g-noSelect,
.g-noSelect * {
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;
}
.g-outline:focus,
.g-outline:active {
outline: 1px dotted;
}
.g-noOutline:focus,
.g-noOutline:active {
outline: 0;
}
.g-lastMargin > :last-child {
margin-bottom: 0;
}
.ellipsis() {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
}
.box-sizing(@val) {
-moz-box-sizing: @val;
-webkit-box-sizing: @val;
box-sizing: @val;
}
.fix9999(@val:150%) {
text-indent: @val;
overflow: hidden;
white-space: nowrap;
}
.emptyBg() {
background: url(data:image/gif;base64,);
}
/* CSS3
============================================================== */
.opacity(@val:0) {
opacity: @val / 100;
filter: alpha(opacity=@val);
}
.background-size(@val) {
-moz-background-size: @val; /* FF 3.6 */
-webkit-background-size: @val; /* Android */
-o-background-size: @val;
background-size: @val;
}
.border-radius(@val:0) {
-moz-border-radius: @val; /* FF 3.6 */
-webkit-border-radius: @val;
border-radius: @val;
}
.border-radius-tl(@val:0) {
-moz-border-radius-topleft: @val;
-webkit-border-top-left-radius: @val;
border-top-left-radius: @val;
}
.border-radius-tr(@val:0) {
-moz-border-radius-topright: @val;
-webkit-border-top-right-radius: @val;
border-top-right-radius: @val;
}
.border-radius-bl(@val:0) {
-moz-border-radius-bottomleft: @val;
-webkit-border-bottom-left-radius: @val;
border-bottom-left-radius: @val;
}
.border-radius-br(@val:0) {
-moz-border-radius-bottomright: @val;
-webkit-border-bottom-right-radius: @val;
border-bottom-right-radius: @val;
}
.box-shadow(@val) {
-moz-box-shadow: @val; /* FF 3.6 */
-webkit-box-shadow: @val;
box-shadow: @val;
}
/*
.linear-gradient(#ffffff; top, #ffffff 0%, #000000 100%);
.linear-gradient(transparent; top, #ffffff 0%, #000000 100%);
.linear-gradient(transparent; top, rgba(255, 255, 255, .35) 0%, rgba(255, 255, 255, .1) 100%);
*/
.linear-gradient(@bgcolor, @val) {
background-color: e(@bgcolor);
background-image: -moz-linear-gradient(@val); /* FF3.6+ */
background-image: -webkit-linear-gradient(@val); /* Chrome10+,Safari5.1+ */
background-image: -o-linear-gradient(@val); /* Opera 11.10+ */
background-image: -ms-linear-gradient(@val); /* IE10+ */
background-image: linear-gradient(@val); /* W3C */
}
.transform(@val) {
-moz-transform: @val;
-webkit-transform: @val;
-o-transform: @val;
-ms-transform: @val;
transform: @val;
}
.transform_notOpera(@val) {
-moz-transform: @val;
-webkit-transform: @val;
-ms-transform: @val;
transform: @val;
}
.transform-origin(@val) {
-moz-transform-origin: @val;
-webkit-transform-origin: @val;
-o-transform-origin: @val;
-ms-transform-origin: @val;
transform-origin: @val;
}
.transform-style(@val) {
//noinspection CssUnknownProperty
-moz-transform-style: @val;
-webkit-transform-style: @val;
transform-style: @val;
}
.transition(@val) {
-moz-transition: @val;
-webkit-transition: @val;
-o-transition: @val;
transition: @val;
}
.transition_notOpera(@val) {
-moz-transition: @val;
-webkit-transition: @val;
transition: @val;
}
.animation(@val) {
-moz-animation: @val;
-webkit-animation: @val;
-o-animation: @val;
animation: @val;
}
.perspective(@val) {
-moz-perspective: @val;
-webkit-perspective: @val;
perspective: @val;
}
.perspective-origin(@val) {
-moz-perspective-origin: @val;
-webkit-perspective-origin: @val;
perspective-origin: @val;
}