-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathcountries.css
More file actions
380 lines (359 loc) 路 9.24 KB
/
Copy pathcountries.css
File metadata and controls
380 lines (359 loc) 路 9.24 KB
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
html {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
body {
background-color: #f4f6f8;
}
a { color:navy; }
nav { display: flex; align-items: center; }
nav a { display:inline-block; margin-right:20px; }
nav .download { margin-right: 20px; }
nav a:last-child,
nav .download:last-child { margin-right:0; }
nav img.download {
filter: drop-shadow(0 1px 1px gray);
transition: transform ease-in-out 300ms;
}
nav img.download:hover { transform: translate(0, -2px); }
.download-links,
[data-template-id="download-links"],
[data-control="download-links"] {
display: flex;
align-items: center;
}
[data-export-csv-selector],
[data-export-excel-selector] { cursor: pointer; }
input,
select,
button {
padding: 8px 16px;
margin: 20px;
width: 100%;
max-width: calc(100vw - 80px);
}
.alternate-names input,
form input,
form select,
form button {
max-width: calc(100% - 120px);
}
@media (min-width: 500px) {
input,
select,
button,
.alternate-names input,
form input,
form select,
form button {
max-width: 300px;
}
}
.react-select input { margin:0; padding:0; }
.react-select {
text-align: left;
max-width: 340px;
margin: 20px auto;
width: 100%;
}
#view,
#root,
.flex-col {
text-align: center;
display: flex;
flex-direction: column;
}
h2, nav, table, form, input, select, button, section, .section, .responsive-table {
flex: 1 0 auto;
align-self: center;
}
table { align-self: start; }
@media screen and (min-width:900px) {
table,
.responsive-table { align-self: center; }
}
input[data-filter-selector],
input[filter-selector],
input[is='input-filter'] {
box-shadow: 0 1px 2px rgba(0,0,0,.5);
border-radius: 2em;
border: none;
outline: 0;
padding: 16px 24px;
/* For Safari on iOS */
-webkit-appearance: none;
}
h1, nav, table, section, form, .responsive-table {
background-color: white;
box-shadow: 0 1px 2px rgba(0,0,0,.5);
padding: 20px;
margin: 20px;
border-radius: 8px;
}
h1, table, section, form, .responsive-table {
display: inline-block;
}
form {
display: flex;
flex-direction: column;
padding: 10px;
margin: 20px 0;
}
form.search {
width: 90%;
max-width: 500px;
}
@media (min-width: 500px) {
form {
padding: 20px;
margin: 20px;
}
}
/*
Originally the the following is used in HTML:
<div class="responsive-table"><table>...
Now `position: sticky` is being used for headers and first column.
When sticky position is used it will not work if "responsive-table" if used
because because of the overflow being defined. The "responsive-table" code is
being kept for reference in case this CSS is copied and used as a starting point
for one of your apps and you prefer responsive tables.
[responsive-table] provides a nice visual layout because it allows the
table to fully fit with-in the page. The user can easily swipe to view
the table on mobile using [responsive-table], however the header and
first column do not stay fixed so the new `position: sticky` can provide
a better user experience (UX) while using a standard <table> element.
*/
.responsive-table {
overflow-x: auto;
max-width: calc(100vw - 40px);
padding: 0;
}
.responsive-table table {
box-shadow: none;
padding: 0;
}
nav { padding: 20px 40px; }
h1 {
border-radius: 2em;
margin: 20px auto;
padding: 20px 30px;
}
@media (min-width: 450px) {
h1 { padding: 20px 80px; }
}
table {
text-align: left;
border-collapse: collapse;
white-space: nowrap;
}
th, td {
padding: 8px 16px;
border: 1px solid #dfe2e5;
}
table tbody tr:nth-child(odd) { background-color: white; }
table tbody tr:nth-child(even) { background-color: #f6f8fa; }
table tbody tr.row-odd { background-color: white; }
table tbody tr.row-even { background-color: #f6f8fa; }
table tbody tr.highlight { background-color: yellow; }
/* Table Sticky Header and First Column */
table { position: relative; margin:20px 0; }
th { position: sticky; top:-1px; background-color: hsla(210, 29%, 93%, 1); z-index:2; }
table thead tr th:first-child { z-index: 3; left: 0; }
table tbody tr td:first-child { position: sticky; left:0; z-index:1; }
table tbody tr:nth-child(odd) td:first-child { background-color: white; }
table tbody tr:nth-child(even) td:first-child { background-color: #f6f8fa; }
table tbody tr.row-odd td:first-child { background-color: white; }
table tbody tr.row-even td:first-child { background-color: #f6f8fa; }
table tbody tr.highlight td:first-child {background-color: yellow; }
/*
In Firefox the sticky cells function but do not look good so the sticky
first column is turned off. For options to work-around this issue see:
https://stackoverflow.com/questions/57166162/table-headers-positionsticky-and-border-issue/57170489
*/
@-moz-document url-prefix() {
table tbody tr td:first-child { position: initial; }
}
.align-right { text-align:right; }
.error { padding:1em; background-color:red; color:white; }
.ml-20 { margin-left: 20px; }
.place-screen {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
justify-content: center;
}
.place-screen section {
flex: 0 0 auto;
align-self: flex-start;
min-width: 250px;
}
.form-fields {
text-align:left;
white-space:nowrap;
padding:10px 20px;
}
.form-fields div {
margin:10px auto;
display: flex;
flex-direction: column;
}
.form-fields label {
color:gray;
width: 100%;
display:block;
margin: 8px auto 4px auto;
}
.form-fields label.no-top-margin { margin-top: 0; }
.form-fields span { font-weight:bold; }
.form-fields i.flag:not(.icon) { margin-top:10px; }
@media screen and (min-width:600px) {
.form-fields div { display:block; }
.form-fields label {
width: 240px;
margin: auto;
display: inline-block;
}
.form-fields i.flag:not(.icon) { margin-top:5px; margin-left:10px; }
}
html[lang='ar'] table i.flag:not(.icon) { margin:0 0 0 .5em; }
div[data-leaflet],
.leaflet-map,
[is="leaflet-map"] { width:300px; height:300px; }
@media (min-width: 500px) {
div[data-leaflet],
.leaflet-map,
[is="leaflet-map"] { width:400px; height:400px; }
}
.map-links {
display: flex;
justify-content: space-between;
margin-top: 10px;
}
.alternate-names { padding:10px; margin:20px 0; }
.alternate-names ul { list-style-type:none; max-width:800px; min-width:100%; padding-left: 0; }
.alternate-names li { border:1px solid #dfe2e5; margin:8px; padding:4px 8px; display: inline-block; }
ul.info {
text-align: left;
max-width: 800px;
padding: 0 30px;
margin-bottom: 40px;
}
html[lang='ar'] ul.info { text-align:right; }
ul.info li { line-height: 1.4em; margin-bottom:10px; }
h2.source-code {
display: flex;
justify-content: center;
align-items: center;
}
h2.source-code img { margin-left:16px; }
h2.source-code,
h2.links {
border-top: 2px solid black;
padding-top: 16px;
}
.pointer { cursor: pointer; }
/* Adjust for jQuery Chosen box-sizing */
select.chosen-select,
input.chosen-search-input { max-width:340px; }
/* Show the loading screen only if it appears for longer than half a second */
.loading {
margin: 40px;
opacity: 0;
animation-name: show-after-delay;
animation-delay: 0.5s;
animation-duration: 0s;
animation-timing-function: linear;
animation-fill-mode: forwards;
}
@keyframes show-after-delay {
0% { opacity: 0; }
100% { opacity: 1; }
}
/*
Loading/Progress Control
https://loading.io/css/
CC) "Public Domain" License
*/
.lds-roller {
display: inline-block;
position: relative;
width: 80px;
height: 80px;
}
.lds-roller div {
animation: lds-roller 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
transform-origin: 40px 40px;
}
.lds-roller div:after {
content: " ";
display: block;
position: absolute;
width: 7px;
height: 7px;
border-radius: 50%;
background: navy;
margin: -4px 0 0 -4px;
}
.lds-roller div:nth-child(1) {
animation-delay: -0.036s;
}
.lds-roller div:nth-child(1):after {
top: 63px;
left: 63px;
}
.lds-roller div:nth-child(2) {
animation-delay: -0.072s;
}
.lds-roller div:nth-child(2):after {
top: 68px;
left: 56px;
}
.lds-roller div:nth-child(3) {
animation-delay: -0.108s;
}
.lds-roller div:nth-child(3):after {
top: 71px;
left: 48px;
}
.lds-roller div:nth-child(4) {
animation-delay: -0.144s;
}
.lds-roller div:nth-child(4):after {
top: 72px;
left: 40px;
}
.lds-roller div:nth-child(5) {
animation-delay: -0.18s;
}
.lds-roller div:nth-child(5):after {
top: 71px;
left: 32px;
}
.lds-roller div:nth-child(6) {
animation-delay: -0.216s;
}
.lds-roller div:nth-child(6):after {
top: 68px;
left: 24px;
}
.lds-roller div:nth-child(7) {
animation-delay: -0.252s;
}
.lds-roller div:nth-child(7):after {
top: 63px;
left: 17px;
}
.lds-roller div:nth-child(8) {
animation-delay: -0.288s;
}
.lds-roller div:nth-child(8):after {
top: 56px;
left: 12px;
}
@keyframes lds-roller {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}