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