]> git.plutz.net Git - shellwiki/blob - themes/default.css
prevent left/right floating inside floated containers
[shellwiki] / themes / default.css
1 /*
2 # Copyright 2022 - 2023 Paul Hänsch
3
4 # Permission to use, copy, modify, and/or distribute this software for any
5 # purpose with or without fee is hereby granted, provided that the above
6 # copyright notice and this permission notice appear in all copies.
7
8 # THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
11 # SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
14 # IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16
17 html { min-height: 100%; }
18
19 body {
20   position: absolute;
21   width: 100%;
22   min-height: 100%;
23   padding-bottom: 6em;
24   background-color: #EEE;
25   font-size: 12pt;
26 }
27
28 header, footer {
29   background-color: #FFF;
30   box-shadow: 0 0 .75em;
31   width: 100%;
32   z-index: 1;
33 }
34
35 footer {
36   padding-top: .5em;
37   position: absolute;
38   bottom: 0;
39 }
40
41 header > :last-child,
42 main > :last-child {
43   margin-bottom: 0;
44 }
45
46 header h1,
47 header h2,
48 header .menu,
49 footer .menu {
50   display: inline-block;
51 }
52
53 header .menu,
54 footer .menu { list-style: none; }
55
56 header .menu > ul > li,
57 header .menu > ol > li,
58 footer .menu > ul > li,
59 footer .menu > ol > li {
60   display: inline-block;
61   margin-right: .5em;
62   vertical-align: top;
63 }
64
65 header .menu.dropdown li > ul,
66 header .menu.dropdown li > ol {
67   display: none;
68   position: absolute;
69   background-color: #FFF;
70   margin: 0;
71   padding: .25em .5em;
72   padding-left: 1.5em;
73   box-shadow: 0 0 .75em;
74 }
75 header .menu.dropdown li:hover > ul,
76 header .menu.dropdown li:hover > ol {
77   display: table;
78 }
79
80 main .pagemenu {
81   list-style: none;
82   background-color: #666;
83   margin: 0;
84   box-shadow: 0 0 .5em;
85   padding: .25em 2em;
86 }
87 main .pagemenu li {
88   display: inline-block;
89   margin-right: 1em;
90 }
91 main .pagemenu li a { color: #FFF; }
92
93 main article,
94 main > form#renamepage, main > form#movepage,
95 main > form#deletepage, 
96 [id$="/[attachment]"] main > form {
97   margin: 1em;
98   padding: .125em 1em 1em 1em;
99   box-shadow: .25em .25em .75em;
100   background-color: #FFF;
101 }
102
103 main > form#deletepage label[for=delsub] {
104   text-decoration: underline;
105 }
106 main > form#deletepage input#delsub:checked + label + ul li.delsub {
107   text-decoration: line-through;
108 }
109
110 [id$="/[revision]"] main .revisions,
111 [id$="/[attachment]"] main > .attachment.list {
112   margin: 1em;
113   padding: 1em 2em;
114 }
115 [id$="/[revision]"] main .revisions:before,
116 [id$="/[attachment]"] main > .attachment.list:before {
117   content: '';
118   position: absolute;
119   top: 0; bottom: 0; left: 0; right: 0;
120   background-color: #FFF;
121   box-shadow: .25em .25em .75em;
122 }
123
124 main code {
125   padding: .125em .25em;
126   background-color: #EEE;
127 }
128 main pre {
129   padding: .5em .5em;
130   background-color: #EEE;
131   max-width: 100%;
132   overflow-x: auto;
133 }
134 main pre > code {
135   padding: 0;
136 }
137
138 li.task > input[type=checkbox][disabled],
139 li.task > p > input[type=checkbox][disabled] {
140   display: none;
141 }
142 li.task > p:first-child { display: inline-block;}
143
144 -li.task:before { font-size: 1.125em; }
145 li.task.pending:before  { content: '\274f  '; color: #222; }
146 li.task.partial:before  { content: '\25d4  '; color: #880; }
147 li.task.negative:before { content: '\2718  '; color: #800; }
148 li.task.done:before     { content: '\2714  '; color: #080; }
149 li.task.unsure:before   { content: '?  '    ; color: #880; font-weight: bold; padding-left: 2pt; }
150
151 /* Alternative Check Symbols, all from "geometric shapes" block */ /*
152 -li.task.pending:before  { content: '\25a1  '; color: #222; }
153 -li.task.partial:before  { content: '\25d4  '; color: #880; }
154 -li.task.negative:before { content: '\25a8  '; color: #800; }
155 -li.task.done:before     { content: '\25a3  '; color: #080; }
156 */
157
158 h1 { text-align: center; }
159 .center { text-align: center; }
160
161 form.newpage, form.search {
162   margin-bottom: 1em;
163 }
164 form.search { text-align: center; }
165 input.search {
166   min-width: 50%;
167   max-width: 80%;
168   max-width: calc(100%  - 2.5em);
169 }
170 ul.searchresults, ol.searchresults {
171   margin-left: auto; margin-right: auto;
172   width: 100%; max-width: 540pt;
173   text-align: center;
174 }
175
176 table {
177   min-width: 50%;
178   margin-left: auto;
179   margin-right: auto;
180 }
181
182 @media(min-width: 540pt) {
183   .half {
184     display: inline-block;
185     width: 50%;
186     padding-right: 1em;
187     vertical-align: top;
188   }
189   .right {
190     float: right;
191     clear: both;
192     width: 33%;
193     margin: .25em 0 .5em 1em;
194   }
195   .left {
196     float: left;
197     clear: both;
198     width: 33%;
199     margin: .25em 1em .5em 0;
200   }
201   .left .left, .left .right,
202   .right .left, .right .right,
203   .half .left, .half .right {
204     float: none;
205     width: 100%;
206     margin: .25em 0 .5em 0;
207   }
208   section.left  > :first-child,
209   section.right > :first-child {
210     float: none;
211     margin: 0 0 .5em 0;
212   }
213   .left  > section:first-child > :first-child,
214   .right > section:first-child > :first-child {
215     margin-top: 0;
216   }
217   .left table, .right table, .half table {
218     width: 100%;
219   }
220
221   .left  input.search,
222   .right input.search {
223     width: 80%;
224     width: calc(100% - 2.5em);
225   }
226   ul.searchresults, ol.searchresults {
227     min-width: 50%;
228   }
229 }
230
231
232 /* === Editor === */
233
234 [id$="/[edit]"] main .pagemenu {
235   margin-bottom: 1em;
236 }
237
238 .tab[name=edithelp] ~ .tab.editor textarea,
239 .tab[name=edithelp] ~ .tab.syntax,
240 .tab[name=edithelp] ~ .tab.attach,
241 .tab[name=edithelp] ~ .tab.transl {
242   background-color: #FFF;
243   min-height: 20em; min-height: 50vh;
244 }
245
246 .tab[name=edithelp] ~ .tab.editor textarea {
247   width: 100%;
248   font-family: monospace;
249   font-size: inherit;
250 }
251
252 .tab[name=edithelp] ~ .tab.attach {
253   padding-top: 1em;
254   padding-left: 7em;
255 }
256 .tab[name=edithelp] ~ .tab.attach .aimg img {
257   float: left;
258   max-height: 4em;
259   margin-left: -6em;
260 }
261
262 .tab[name=edithelp] ~ .tab.transl {
263   font-family: monospace;
264   white-space: pre;
265 }
266
267 .tab[name=edithelp]#editor:checked ~ .tab.editor,
268 .tab[name=edithelp]#syntax:checked ~ .tab.syntax,
269 .tab[name=edithelp]#attach:checked ~ .tab.attach,
270 .tab[name=edithelp]#transl:checked ~ .tab.transl {
271   display: block;
272 }
273
274
275 /* === Attachments === */
276
277 .attachment.list button[name=delete] {
278   font-size: .75em;
279   line-height: 1.25em;
280   margin-right: 1.25em;
281 }
282 .attachment.list .size,
283 .attachment.list .date {
284   font-size: .875em;
285   top: -.25em;
286 }
287
288 .attachment.list .name:after {
289   white-space: pre-line;
290   content: "\0a";
291 }
292 .attachment.list .size {
293   margin-right: 1em;
294 }
295
296 .revisions li { margin: 1em 0; }
297 .revisions li span.hash,
298 .revisions li span.date {
299   margin-right: 1em;
300 }
301
302 .revisions .diff span {
303   font-family: monospace;
304   display: block;
305   white-space: pre;
306   line-height: 1.375em;
307 }
308 .revisions .diff span.linenum { color: #D60; }
309 .revisions .diff span.linedel { color: #A00; }
310 .revisions .diff span.lineadd { color: #0A0; }
311 .revisions .diff span.linenote { color: #AAA; }
312
313
314 [id$="/[attachment]"] input[type=radio].tab ~ div.tab {
315   display: block;
316   padding-top: 1em;
317 }
318 [id$="/[attachment]"] input[type=radio].tab ~ div.tab ul.attachment.list {
319   list-style: none;
320   margin-left: 0;
321 }
322
323 .tab ul li input[name=select],
324 .tab ul li label.name,
325 .tab ul li a.name,
326 .tab ul li input.name {
327   display: none;
328 }
329
330 [id$="/[attachment]"] input[type=radio].tab#tview:checked ~ div.tab ul li a.name,
331 [id$="/[attachment]"] input[type=radio].tab#tdel:checked  ~ div.tab ul li input[name=select],
332 [id$="/[attachment]"] input[type=radio].tab#tdel:checked  ~ div.tab ul li label.name,
333 [id$="/[attachment]"] input[type=radio].tab#tmove:checked ~ div.tab ul li input[name=select],
334 [id$="/[attachment]"] input[type=radio].tab#tmove:checked ~ div.tab ul li label.name {
335   display: inline;
336 }
337 [id$="/[attachment]"] input[type=radio].tab#tren:checked ~ .tab ul li input.name {
338   display: block;
339 }
340
341 [id$="/[attachment]"] label[for=moveto], [id$="/[attachment]"] input#moveto,
342 [id$="/[attachment]"] button[name=action] { display: none; }
343
344 [id$="/[attachment]"] .upload button[name=action] { display: inline-block; }
345 [id$="/[attachment]"] input[type=radio].tab#tdel:checked  ~ div.tab button[name=action][value=delete],
346 [id$="/[attachment]"] input[type=radio].tab#tmove:checked ~ div.tab label[for=moveto],
347 [id$="/[attachment]"] input[type=radio].tab#tmove:checked ~ div.tab input#moveto,
348 [id$="/[attachment]"] input[type=radio].tab#tmove:checked ~ div.tab button[name=action][value=move],
349 [id$="/[attachment]"] input[type=radio].tab#tren:checked  ~ div.tab button[name=action][value=rename] {
350   display: inline;
351 }
352
353
354 /* === Macros === */
355
356 .macro.toc {
357   display: inline-block;
358   list-style-position: inside;
359   margin-left: 0;
360   background-color: #DDD;
361   background-color: rgba(0, 0, 0, .125);
362   padding: .75em 1em;
363   border: 1pt solid;
364   border-radius: 2pt;
365 }
366 .macro.toc li.h2 { margin-left: 1.25em; }
367 .macro.toc li.h3 { margin-left: 2.5em; }
368 .macro.toc li.h4 { margin-left: 3.75em; }
369 .macro.toc li.h5 { margin-left: 5em; }
370 .macro.toc li.h6 { margin-left: 6.25em; }
371
372
373 .macro.gallery {
374   text-align: center;
375   margin: 2em 0;
376   padding: .5em .125em;
377   background-color: #444;
378   clear: both;
379 }
380 .macro.gallery img {
381   max-height: 9em;
382   margin: 0 .25em;
383 }
384
385
386 ul.macro.tag { padding: 0; }
387 .macro.tag li.tag {
388   display: inline-block;
389   color: #FFF;
390   background-color: #333;
391   font-size: .875em;
392   padding: 0 .5em;
393   margin: .25em .25em 0 0;
394   border-radius: .375em;
395 }
396
397
398 .macro.changes td .date {
399   display: block;
400   font-size: .75em;
401 }
402 .macro.changes td.outdated,
403 .macro.changes td.current,
404 .macro.changes td.missing {
405   text-align: center;
406 }
407 .macro.changes th { background-color: #EEF; }
408 .macro.changes td { background-color: #DFF; }
409 .macro.changes td.outdated { background-color: #FFD; }
410 .macro.changes td.current  { background-color: #DFD; }
411 .macro.changes td.missing  { background-color: #FDD; }