]> git.plutz.net Git - confetti/blob - style.css
seed field for entering card record from spreadsheet
[confetti] / style.css
1 * {
2   position: relative;
3   box-sizing: border-box;
4   max-width: 100%;
5   font-family: sans-serif;
6   font-weight: normal;
7   font-size: initial;
8   font-style: normal;
9   text-decoration: none;
10   line-height: 1.5em;
11   color: inherit; background: transparent;
12   padding: 0; margin: 0;
13   border: none;
14 }
15
16 body {
17   color: #000; background-color: #FFF;
18 }
19
20 /* ======= GENERIC HTML STYLES =======*/
21
22 p { margin-bottom: 1em; }
23
24 a {
25   text-decoration: underline;
26   font-style: italic;
27   color: #068;
28 }
29
30 i, em { font-style: italic; }
31 b, strong { font-weight: bolder; }
32 ul, ol { margin-left: 1.125em; }
33 table th { font-weight: bold; }
34
35 h1, h2, h3 {
36   font-weight: bold;
37   margin-top: 1em;
38   margin-bottom: .5em;
39 }
40
41 h1:first-child, h2:first-child, h3:first-child,
42 p + h1, p + h2, p + h3 {
43   margin-top: 0;
44 }
45
46 h4, h5, h6, form legend {
47   font-weight: bolder;
48   margin-bottom: .25em;
49 }
50
51 h1 { font-size: 1.5em; }
52 h2 { font-size: 1.125em; }
53
54 select, input, button, textarea,
55 .control a {
56   display: inline-block;
57   background-color: #FFF;
58   border: 1pt solid;
59   padding: .25em .75em;
60   vertical-align: text-bottom;
61 }
62 .control a {
63   color: inherit;
64   font-style: normal;
65   text-decoration: none;
66 }
67
68 select { padding: .375em 0; }
69
70 input[type=radio], input[type=checkbox] {
71   vertical-align: baseline;
72 }
73 input[type=number] { text-align: right; padding-right: 0; }
74
75 button, input[type=button],
76 .control a {
77   box-shadow: .125em .125em .25em;
78   cursor: pointer;
79 }
80 input[type=radio], input[type=checkbox],
81 input[type=radio] + label, input[type=checkbox] + label {
82   cursor: pointer;
83 }
84
85 label { margin-right: .75em; }
86 input + label {
87   margin-left: .375em;
88 }
89
90 /* ====== COMMON ELEMENTS ======*/
91
92 body > ul.menu {
93   display: block;
94   height: 1.75em;
95   margin: 0; -padding: 0 .5em;
96   list-style: none;
97   color: #CCC;
98   background-color: #444;
99   box-shadow: inset 0 -.25em .25em #000;
100   overflow: hidden;
101   z-index: 3;
102 }
103
104 body > .menu li {
105   display: inline-block;
106 }
107 body > .menu a {
108   color: inherit;
109   padding: .5em 3em;
110   box-shadow: inset 0 0 .5em #000;
111 }
112 body.cards > .menu a[href="/cards/"],
113 body.courses > .menu a[href="/courses/"] {
114   color: #000;
115   background-color: #FFF;
116   box-shadow: none;
117 }
118
119 /* =========== FILTER AND SEARCH Headers ========= */
120
121 form.categories,
122 form.search, form.sort, form.filter, form.newcard, form.newcourses {
123   margin-top: 1em; padding: 0 1em;
124   z-index: 1;
125 }
126 form.filter > h1 { display: none; }
127
128 form.filter fieldset { margin-top: .5em; }
129 form.filter fieldset.item + fieldset.item legend { display: none; }
130 form.filter fieldset.item input[type=radio] { display: none; }
131 form.filter fieldset.item input[type=radio] + label {
132   display: table-cell;
133   padding: .5em 1em;
134   background-color: #EEE;
135   border-style: solid;
136   border-width: .5pt .25pt 0 .25pt;
137   white-space: normal;
138 }
139 form.filter fieldset.item input[type=radio] + label:first-of-type {
140   border-left: 1pt solid;
141 }
142 form.filter fieldset.item input[type=radio]:checked + label {
143   position: relative;
144   background-color: #FFF;
145   box-shadow: .125em -.125em .125em #888;
146   z-index: 1;
147 }
148 form.filter fieldset.item input[type=text],
149 form.filter fieldset.item fieldset.categories {
150   position: relative;
151   display: block;
152   width: 100%;
153   margin-top: -1pt;
154   padding: .25em .75em;
155   border: 1pt solid;
156   box-shadow: .125em .125em .25em #888;
157 }
158 form.filter fieldset.item fieldset.categories { display: none; }
159 form.filter fieldset.item input[value=CATEGORIES]:checked + label + input[type=text] { display: none; }
160 form.filter fieldset.item input[value=CATEGORIES]:checked + label + input[type=text] + fieldset.categories { display: block; }
161
162 form.filter fieldset.order legend {
163   float: left; margin-right: 1em;
164 }
165
166 form.filter fieldset label,
167 form.filter fieldset a { white-space: pre;}
168 form.filter button[type=submit] {
169   margin-top: .5em; margin-bottom: .5em;
170 }
171
172 body.courses form .order { display: inline-block; margin-right: 2em;}
173
174 body.cards form.newcard { display: flex; }
175 body.cards form.newcard input[name=seed] { flex: 1; }
176
177
178 /* ============ LIST ITEMS, Generic ============= */
179
180 body > form,
181 div.card,
182 div.course {
183   position: relative;
184   width: 98%; width: calc(100% - 2em);
185   margin-left: auto; margin-right: auto;
186   margin-bottom: 1em;
187   box-shadow: .125em .125em .25em;
188   z-index: 1;
189 }
190
191 /* HACK: put anchor point 10em above card and highlight target element */
192     div:target { box-shadow: none; z-index: 0; }
193     div:target:before {
194       content: '';
195       display: block;
196       margin-top: -10em;
197       height: 10em;
198       visibility: hidden;
199     }
200     div:target:after {
201       content: '';
202       display: block;
203       position: absolute;
204       left: 0; right: 0;
205       top: 10em; bottom: 0;
206       box-shadow: .125em .125em .25em;
207       animation: highlight 4s;
208       z-index: -1;
209     }
210     @keyframes highlight { from { background-color: #FF0; } to { background-color: transparent; } }
211 /**/
212
213 div .section, form .section {
214   display: block;
215   vertical-align: top;
216   padding: 0 1em;
217   overflow: hidden;
218   word-break: break-word;
219 }
220
221 div .section :last-child, form .section :last-child {
222   margin-bottom: 1em;
223 }
224
225 div .section h2, form .section h2,
226 div .section h3, form .section h3 { 
227   border-bottom: 1pt solid #EEE;
228 }
229 div .control, form .control {
230   background-color: #EEE;
231   padding: .25em;
232   text-align: right;
233 }
234
235 @media(min-width: 60em) {
236   div .section, form .section {
237     display: table-cell;
238     width: calc(100% / 10);
239   }
240   div .section :last-child { margin-bottom: 0; }
241   div .control, form .control {
242     background-color: transparent;
243   }
244   div .section:nth-of-type(2n) {
245     background-color: #EEE;
246   }
247 }
248 @media(min-width: 80em) {
249   div .control, form .control {
250     display: table-cell;
251     width: calc(100% / 10);
252   }
253   div .control .item, form .control .item {
254     display: block;
255     margin-bottom: .25em;
256   }
257 }
258
259 div .section .item, form .section .item,
260 form .section.attendance > label {
261   display: block;
262   width: 100%;
263 }
264
265 div .section .item.NOTE {
266   white-space: pre-wrap;
267 }
268
269 form .section .item {
270   margin-bottom: .25em;
271 }
272
273 form .section button[value^=addfield] {
274   font-size: .75em;
275   margin-top: .5em; padding: 0 .375em;
276 }
277
278 /* HACK: "responsive" Delete Button above each field */
279     form input.delete { display: none; }
280     form input.delete + label {
281       float: right;
282       font-size: .75em;
283       line-height: 1;
284       max-width: 1.75em; height: 1.125em; overflow: hidden;
285       color: #FBB; background-color: #444;
286       margin: 0; padding: .125em .5em 0 .5em;
287       border-radius: 4pt 4pt 0 0;
288       transition: max-width .3s;
289     }
290     form input.delete + label:before  { content: '\274c '; margin-right: .5em; }
291     form input.delete + label:hover   { max-width: 10em; }
292     -form input.delete + label:hover:before { content: ''; }
293     -form input.delete + label:hover:after  { content: ' \274c'; }
294     form input.delete:checked + label,
295     form input.delete:checked + label + *,
296     form input.delete:checked + label + .teltype + .TEL {
297       display: none;
298     }
299 /**/
300
301
302 /* ====== right hand Control Buttons on list items ====== */
303
304 form .control {
305   position: relative;
306   padding-left: 11em;
307   padding-top: 1.5em;
308 }
309 form .control .item {
310   display: inline-block;
311   margin-bottom: .25em;
312   vertical-align: text-bottom;
313 }
314
315 /* Combined Select/Submit Box */
316     form .control .item.newfield { box-shadow: .125em .125em .25em; }
317     form .control .item.newfield select { margin-right: -1pt; }
318     form .control .item.newfield button { box-shadow: none; }
319 /**/
320
321 /* HACK: Delete Checkbox before delete Button */
322     form .control .item.delete {
323       position: absolute;
324       bottom: .375em; left: .25em; width: auto;
325       padding-bottom: calc(2.25em + 2pt);
326     }
327     
328     form .control .item.delete input + label + button {
329       display: none;
330       position: absolute;
331       bottom: 0; width: 100%;
332       color: #800;
333       background-color: #FEE;
334       z-index: 1;
335     }
336     form .control .item.delete:after {
337       content: attr(label);
338       display: block;
339       position: absolute;
340       bottom: 0; width: 100%;
341       text-align: center;
342       color: #BAA;
343       padding: .25em 0;
344       border: 1pt solid;
345       box-shadow: .125em .125em .25em;
346     }
347     form .control .item.delete input:checked + label + button { display: block; }
348 /**/
349
350 @media(min-width: 80em) {
351   form .control { padding: .25em; min-height: 16em; }
352   form .control .item { width: 100%; }
353   form .control .item.newfield select { width: calc(100% - 2.5em); }
354   form .control .item.delete { bottom: .125em; right: .25em; }
355 }
356
357 /* ======= LIST ITEMS, Courses ======= */
358
359 form.course .dtstart input[name=DTS_YEAR],
360 form.course .dtstart select[name=DTS_MONTH] { width: calc(50% - 1.25em); }
361 form.course .dtstart input[name=DTS_YEAR] { margin-right: -.375em; }
362 form.course .dtstart table { width: 100%; margin: 1em 0; }
363 form.course .dtstart table td { text-align: right; -border: .5pt solid; }
364 form.course .dtstart table input[type=radio] { display: none; }
365 form.course .dtstart table input[type=radio] + label {
366   display: block;
367   width: 100%;
368   margin: 0; padding: 0 3pt;
369 }
370 form.course .dtstart table input[type=radio]:checked + label {
371   font-weight: bold;
372   padding: 0 2pt;
373   box-shadow: .125em .125em .25em;
374 }
375
376 form.course .dtstart label.DTSTIME {
377   display: inline-block;
378   font-weight: bold;
379   margin: 0;
380   width: calc(100% - 7.875em);
381 }
382 form.course .dtstart input[name=DTS_HOUR],
383 form.course .dtstart input[name=DTS_MINUTE] {
384   vertical-align: baseline;
385   width: 3.5em;
386   margin-bottom: 0;
387 }
388
389 form.course .recur .item { white-space: nowrap; }
390 form.course .recur .item > * { margin-bottom: 0; vertical-align: baseline; }
391 form.course .recur input[name=RRULE_INTERVAL],
392 form.course .recur input[name=RRULE_COUNT],
393 form.course .recur input[name=RRULE_UMONTH],
394 form.course .recur input[name=RRULE_UDAY] { width: 3.5em; }
395 form.course .recur input[name=RRULE_UYEAR] { width: 4.5em; }
396 form.course .recur input[name=RRULE_UYEAR],
397 form.course .recur input[name=RRULE_UMONTH],
398 form.course .recur input[name=RRULE_UDAY] {
399   margin-right: -.375em;
400 }
401
402 form.course .attendance div.attendance {
403   max-height: 16em;
404   overflow-y: scroll;
405 }
406 form.course .attendance label {
407   display: inline-block;
408   max-width: calc(100% - 2em);
409   vertical-align: top;
410   margin-bottom: 0;
411 }
412 form.course .attendance input { margin-top: .375em; }
413
414 /* ======== Categories Page ======== */
415
416 body.categories form ul { list-style: none; margin: 0; }
417
418 form.categories li {
419   display: inline-block;
420   background-color: #EEE;
421   margin-right: .5em; margin-bottom: .5em;
422   padding-left: .5em;
423   box-shadow: .125em .125em .25em;
424 }
425 form.categories li button[name=remove] {
426   font-size: .75em;
427   width: 2.5em;
428   background-color: #FBB;
429   overflow: hidden;
430   white-space: pre;
431 }
432 form.categories li button[name=remove]:before {
433   content: '\274C ';
434   margin-right: 3em;
435 }
436
437 form.categories li:last-child { padding-left: 0 }
438
439 body.categories form.namelist ul.namelist > li:nth-of-type(2n + 1) { background-color: #EEE; }
440 body.categories form.namelist ul.namelist > li h2,
441 body.categories form.namelist ul.namelist > li ul {
442   display: inline-block;
443 }
444 body.categories form.namelist ul.namelist > li h2 {
445   width: 20%;
446   min-width: 10em;
447 }
448 body.categories form.namelist ul.namelist > li ul li {
449   display: inline-block;
450 }