-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui-less-build-utils.less
123 lines (102 loc) · 2.42 KB
/
ui-less-build-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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
.build-namespace (@nsp) {
@namespace-value: ~'@{nsp}';
html, body {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
position: relative;
}
.@{namespace-value} {
:focus {
outline: 0;
}
textarea, input {
overflow: hidden;
resize: none;
.build-border-radius (@radius: 0);
.build-user-select();
.build-box-sizing();
}
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button {
-webkit-appearance: none;
}
input[type=number] {
-moz-appearance:textfield;
}
.@{namespace-value}-scroller {
overflow: hidden;
position: relative;
}
.@{namespace-value}-hidden {
display: none;
}
.@{namespace-value}-nowrap {
white-space: nowrap;
}
.@{namespace-value}-underline {
text-decoration: underline;
}
}
}
.build-user-select (@select: text;) {
-webkit-user-select: @select; /* webkit (safari, chrome) browsers */
-moz-user-select: @select; /* mozilla browsers */
-khtml-user-select: @select; /* webkit (konqueror) browsers */
-ms-user-select: @select; /* IE10+ */
};
.build-box-sizing (@border-box: border-box;) {
box-sizing: @border-box;
-webkit-box-sizing: @border-box;
-moz-box-sizing: @border-box;
};
.build-transition (@property, @time) {
@property-value: ~'@{property}';
-webkit-transition: @property-value @time;
-moz-transition: @property-value @time;
-o-transition: @property-value @time;
transition: @property-value @time;
}
.build-placeholder(
@font-family,
@font-size,
@font-style: normal,
@text-align: left,
@color: black
) {
@font-size-value: ~'@{font-size}px';
&::-webkit-input-placeholder {
font-family: @font-family;
font-style: @font-style;
font-size: @font-size-value;
text-align: @text-align;
color: @color;
}
&::-moz-placeholder {
font-family: @font-family;
font-style: @font-style;
font-size: @font-size-value;
text-align: @text-align;
color: @color;
}/* Firefox 19+ */
&:-moz-placeholder {
font-family: @font-family;
font-style: @font-style;
font-size: @font-size-value;
text-align: @text-align;
color: @color;
}/* Firefox 18- */
&:-ms-input-placeholder {
font-family: @font-family;
font-style: @font-style;
font-size: @font-size-value;
text-align: @text-align;
color: @color;
}
}
.build-border-radius (@radius: 1) {
@radius-value: ~'@{radius}px';
border-radius: @radius-value;
-webkit-border-radius: @radius-value;
-moz-border-radius: @radius-value;
}