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