c6faec44
梁灏
init ColorPicker
|
1
2
3
|
@color-picker-prefix-cls: ~"@{css-prefix}color-picker";
.@{color-picker-prefix-cls} {
|
4109bbc6
梁灏
update ColorPicker
|
4
|
display: inline-block;
|
77950c30
梁灏
update ColorPicker
|
5
6
7
|
& .@{select-dropdown-prefix-cls} {
padding: 0;
}
|
b6bda1dc
梁灏
update ColorPicker
|
8
9
10
11
|
&-rel{
line-height: 0;
}
&-color{
|
9673dcb0
梁灏
update ColorPicker
|
12
13
|
width: 18px;
height: 18px;
|
0aefe4aa
梁灏
update ColorPicker
|
14
|
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==);
|
dab39476
梁灏
update ColorPicker
|
15
|
border-radius: 2px;
|
9673dcb0
梁灏
update ColorPicker
|
16
17
|
position: relative;
top: 2px;
|
0aefe4aa
梁灏
update ColorPicker
|
18
19
20
21
22
23
|
div{
width: 100%;
height: 100%;
box-shadow: inset 0 0 0 1px rgba(0,0,0,.15);
border-radius: 2px;
}
|
c0fa72ca
梁灏
update ColorPicker
|
24
25
26
27
28
29
30
31
|
&-empty{
background: #fff;
overflow: hidden;
text-align: center;
i{
font-size: 20px;
}
}
|
9673dcb0
梁灏
update ColorPicker
|
32
33
34
35
36
37
38
39
40
41
|
}
&-large &-color{
width: 20px;
height: 20px;
top: 1px;
}
&-small &-color{
width: 14px;
height: 14px;
top: 3px;
|
b6bda1dc
梁灏
update ColorPicker
|
42
|
}
|
9af2f01c
梁灏
update ColorPicker
|
43
44
|
&-picker{
|
77950c30
梁灏
update ColorPicker
|
45
46
47
|
&-wrapper{
padding: 8px 8px 0;
}
|
9af2f01c
梁灏
update ColorPicker
|
48
|
&-panel{
|
59dc2df0
梁灏
update ColorPicker
|
49
|
width: 240px;
|
9af2f01c
梁灏
update ColorPicker
|
50
|
margin: 0 auto;
|
e7893a68
梁灏
update ColorPicker
|
51
52
|
box-sizing: initial;
position: relative;
|
9af2f01c
梁灏
update ColorPicker
|
53
|
}
|
e7893a68
梁灏
update ColorPicker
|
54
55
56
57
|
&-hue-slider, &-alpha-slider{
height: 10px;
margin-top: 8px;
position: relative;
|
9af2f01c
梁灏
update ColorPicker
|
58
59
60
|
}
&-colors{
margin-top: 8px;
|
e7893a68
梁灏
update ColorPicker
|
61
|
overflow: hidden;
|
9af2f01c
梁灏
update ColorPicker
|
62
63
|
span{
display: inline-block;
|
e7893a68
梁灏
update ColorPicker
|
64
65
66
|
width: 20px;
height: 20px;
float: left;
|
9af2f01c
梁灏
update ColorPicker
|
67
68
69
70
|
em{
display: block;
width: 16px;
height: 16px;
|
e7893a68
梁灏
update ColorPicker
|
71
|
margin: 2px;
|
9af2f01c
梁灏
update ColorPicker
|
72
73
|
cursor: pointer;
border-radius: 2px;
|
dab39476
梁灏
update ColorPicker
|
74
|
box-shadow: inset 0 0 0 1px rgba(0,0,0,.15);
|
9af2f01c
梁灏
update ColorPicker
|
75
76
77
|
}
}
}
|
9af2f01c
梁灏
update ColorPicker
|
78
79
80
81
|
.@{picker-prefix-cls}-confirm{
margin-top: 8px;
}
}
|
e7893a68
梁灏
update ColorPicker
|
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
|
&-saturation{
&-wrapper{
width: 100%;
padding-bottom: 75%;
position: relative;
overflow: hidden;
}
&, &--white, &--black{
cursor: pointer;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
&--white{
background: linear-gradient(to right, #fff, rgba(255,255,255,0));
}
&--black{
background: linear-gradient(to top, #000, rgba(0,0,0,0));
}
&-pointer{
cursor: pointer;
position: absolute;
}
&-circle{
cursor: head;
width: 4px;
height: 4px;
box-shadow: 0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3), 0 0 1px 2px rgba(0,0,0,.4);
border-radius: 50%;
transform: translate(-2px, -2px);
}
}
&-hue{
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
border-radius: 2px;
background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
&-container{
cursor: pointer;
margin: 0 2px;
position: relative;
height: 100%;
}
&-pointer{
z-index: 2;
position: absolute;
}
&-picker{
cursor: pointer;
margin-top: 1px;
width: 4px;
border-radius: 1px;
height: 8px;
box-shadow: 0 0 2px rgba(0, 0, 0, .6);
background: #fff;
transform: translateX(-2px);
}
}
&-alpha{
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
&-checkboard-wrap{
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: hidden;
|
1f61a559
梁灏
update ColorPicker
|
161
|
border-radius: 2px;
|
e7893a68
梁灏
update ColorPicker
|
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
|
}
&-checkerboard{
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==);
}
&-gradient{
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
|
1f61a559
梁灏
update ColorPicker
|
177
|
border-radius: 2px;
|
e7893a68
梁灏
update ColorPicker
|
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
|
}
&-container{
cursor: pointer;
position: relative;
z-index: 2;
height: 100%;
margin: 0 3px;
}
&-pointer{
z-index: 2;
position: absolute;
}
&-picker{
cursor: pointer;
width: 4px;
border-radius: 1px;
height: 8px;
box-shadow: 0 0 2px rgba(0, 0, 0, .6);
background: #fff;
margin-top: 1px;
transform: translateX(-2px);
}
}
|
59dc2df0
梁灏
update ColorPicker
|
201
202
203
204
205
206
207
208
209
|
&-confirm{
position: relative;
&-color{
position: absolute;
top: 11px;
left: 8px;
}
}
|
c6faec44
梁灏
init ColorPicker
|
210
|
}
|