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