-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
executable file
·148 lines (129 loc) · 2.7 KB
/
style.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
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
div.select[data-multiple] div.header {
/* display: none; */
}
div.select div.header {
content: "↓";
display: flex;
flex: 1;
align-items: center;
padding: 0;
position: relative;
width: auto;
box-sizing: border-box;
border-width: 1px;
border-style: inherit;
border-color: inherit;
border-radius: inherit;
}
div.select div.header::after {
content: "↓";
align-self: stretch;
display: flex;
align-content: center;
justify-content: center;
justify-items: center;
align-items: center;
padding: 0.5em;
}
div.select div.header:hover::after {
background-color: blue;
}
.select .header select {
appearance: none;
font-family: inherit;
font-size: inherit;
padding: 0;
border-width: 0;
width: 100%;
flex: 1;
display: none;
}
.select .header select optgroup {
display: none;
}
.select select div.option {
display: none;
}
div.select {
user-select: none;
box-sizing: border-box;
position: relative;
border-radius: 4px;
border-style: solid;
border-width: 0;
border-color: gray;
width: auto;
display: inline-block;
}
div.select:focus,
div.select:hover {
border-color: blue;
}
div.select[data-open] {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
div.select[data-open] datalist {
display: initial;
}
div.select datalist {
appearance: none;
position: absolute;
border-style: solid;
border-width: 1px;
border-color: gray;
left: 0;
display: none;
width: 100%;
box-sizing: border-box;
z-index: 2;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
}
div.select datalist div.option {
background-color: white;
margin-bottom: 1px;
cursor: pointer;
padding: 0.5em;
border-width: 0;
}
div.select datalist div.option .label{
pointer-events: none;
}
div.select datalist div.option:hover,
div.select datalist div.option:focus,
div.select datalist div.option:checked,
div.select datalist div.option.selected {
background-color: blue;
color: white;
}
html
body
form
fieldset
div.select
div.optgroup
div.option[data-disabled] {
color: gray;
}
html
body
form
fieldset
div.select
div.optgroup
div.option[data-checked] {
background-color: blue;
color: white;
}
div.select div.optgroup div.label {
font-weight: bold;
}
div.select div.optgroup div.option div.label {
font-weight: normal;
padding: 0.25em;
}
div.select div.header span {
flex: 1;
padding: 0.5em;
}