-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcolor-swatch.css
75 lines (67 loc) · 1.27 KB
/
color-swatch.css
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
.color-swatch {
display: inline-block;
padding: 0.1em 0.3em;
font-size: inherit;
cursor: pointer;
}
.color-swatch-container {
display: inline-block;
}
.color-swatch-preview {
display: inline-block;
width: 1.1em;
height: 1.1em;
vertical-align: bottom;
border-radius: 1em;
border: solid 1px rgba(0, 0, 0, 0.5);
cursor: pointer;
}
.color-swatch-ui { /* closed style */
position: absolute;
display: flex;
flex-direction: column;
transform: scale(0.1);
max-height: 0;
max-width: 0;
width: 90vw;
margin: -1em 0 0 0;
border: solid 1px rgba(0, 0, 0, 0.5);
background: rgba(255, 255, 255, 0.2);
box-shadow: 0 0 0 rgba(0, 0, 0, 0);
border-radius: 10em;
overflow: hidden;
opacity: 0.8;
transition: all 0.5s ease-in-out;
}
.color-swatch-ui.open {
transform: scale(1);
max-height: 500px;
max-width: 600px;
margin: 0.5em 0 0 -300px;
opacity: 1;
box-shadow: 0 0.5em 1em rgba(0, 0, 0, 0.5);
border-radius: 0.3em;
}
.color-swatch-ui ul {
display: flex;
flex-direction: column;
list-style: none;
width: 100%;
margin: 0;
padding: 0;
}
.color-swatch-ui ul > div {
display: flex;
flex-direction: row;
}
.color-swatch-selection {
height: 6em;
width: 100%
}
.color-swatch-option {
flex-grow: 1;
min-width: 1em;
height: 2em;
margin: 0;
cursor: pointer;
}