xref: /template/sprintdoc/css/base_design.less (revision 5c8e72a675867c2b34a26a6025225f998780d12b)
1/**
2 * This file provides the main design styles
3 * across all template elements (typo, colors etc.)
4 *
5 * @author Jana Deutschlaender <deutschlaender@cosmocode.de>
6 */
7
8
9html, body {
10    background-color: @ini_background;
11}
12
13
14/* highlight selected tool */
15
16.mode_admin a.action.admin,
17.mode_login a.action.login,
18.mode_register a.action.register,
19.mode_profile a.action.profile,
20.mode_recent a.action.recent,
21.mode_index a.action.index,
22.mode_media a.action.media,
23.mode_revisions a.action.revs,
24.mode_backlink a.action.backlink,
25.mode_subscribe a.action.subscribe {
26    font-weight: bold;
27}
28
29.dokuwiki {
30    .page ol li,
31    .page ul li,
32    .aside ul li {
33        color: @ini_text;
34    }
35
36    .pageId {
37        float: right;
38        margin-right: -1em;
39        margin-bottom: -1px;
40        margin-top: -1.5em;
41        overflow: hidden;
42        padding: 0.5em 1em 0;
43
44        span {
45            font-size: @font-size-small;
46            border: solid @ini_background_alt;
47            border-width: 1px 1px 0;
48            background-color: @ini_background;
49            color: @ini_text_alt;
50            padding: .1em .35em;
51            border-top-left-radius: 2px;
52            border-top-right-radius: 2px;
53            box-shadow: 0 0 .5em @ini_text_alt;
54            display: block;
55        }
56    }
57
58    div.page {
59        clear: both;
60        overflow: hidden;
61        word-wrap: break-word;
62        background: @ini_background_content;
63        color: inherit;
64        padding: @page_padding-top @margin-default @margin-default;
65
66        @media @screen_max-md {
67            padding-right: (@margin-default * 1.6);
68        }
69
70        @media @screen_max-xs {
71            padding-left: @margin-small;
72        }
73    }
74
75    .content #dokuwiki__pagetools {
76        @media @screen_max-md {
77            top: 4rem;
78        }
79    }
80
81    .docInfo {
82        font-size: @font-size-small;
83        text-align: right;
84    }
85
86    /* license note under edit window */
87    div.license {
88        font-size: @font-size-small;
89        line-height: @line-height-default;
90        padding-top: 1rem;
91
92        @media @screen_max-lg {
93            font-size: @font-size-default;
94        }
95
96        @media @screen_max-md {
97            font-size: @font-size-small;
98        }
99
100        * {
101            font-size: inherit;
102        }
103    }
104
105    [dir=rtl] & .docInfo {
106        text-align: left;
107    }
108
109    [dir=rtl] & .pageId {
110        float: left;
111        margin-left: -1em;
112        margin-right: 0;
113    }
114}
115
116caption,
117figcaption,
118summary,
119legend {
120    padding: 0;
121    margin: 0 0 .35em;
122    line-height: 1.2;
123}
124
125h1,
126h2,
127h3,
128h4,
129h5,
130h6 {
131    font-weight: bold;
132    padding: 0;
133    line-height: 1.2;
134    clear: both;
135}
136
137[dir=rtl] h1,
138[dir=rtl] h2,
139[dir=rtl] h3,
140[dir=rtl] h4,
141[dir=rtl] h5,
142[dir=rtl] h6 {
143    clear: right;
144}
145
146h1 {
147    font-size: @font-size-head1;
148    margin: 0 0 @font-size-head1;
149    padding-top: 1em;
150}
151
152h2 {
153    font-size: @font-size-head2;
154    margin: 0 0 @font-size-head2;
155    padding-top: (@font-size-head2 / 2);
156
157    .secedit + &,
158    .section_highlight &:first-child {
159        padding-top: 0;
160    }
161
162    .section_highlight + & {
163        padding-top: (@font-size-head2 / 2);
164    }
165}
166
167h3 {
168    font-size: @font-size-head3;
169    margin: 0 0 @font-size-head3;
170    padding-top: (@font-size-head3 / 2);
171
172    .secedit + &,
173    .section_highlight &:first-child {
174        padding-top: 0;
175    }
176
177    .section_highlight + & {
178        padding-top: (@font-size-head3 / 2);
179    }
180}
181
182h4 {
183    font-size: @font-size-head4;
184    margin: 0 0 @font-size-head4;
185    padding-top: (@font-size-head4 / 2);
186
187    .secedit + &,
188    .section_highlight &:first-child {
189        padding-top: 0;
190    }
191
192    .section_highlight + & {
193        padding-top: (@font-size-head4 / 2);
194    }
195}
196
197h5 {
198    font-size: @font-size-head5;
199    margin: 0 0 @font-size-head5;
200    padding-top: (@font-size-head5 / 2);
201
202    .secedit + &,
203    .section_highlight &:first-child {
204        padding-top: 0;
205    }
206
207    .section_highlight + & {
208        padding-top: (@font-size-head5 / 2);
209    }
210}
211
212h6 {
213    font-size: @font-size-head6;
214    font-weight: @font-weight-bold;
215    margin: 0 0 @font-size-head6;
216    padding-top: (@font-size-head6 / 2);
217
218    .secedit + &,
219    .section_highlight &:first-child {
220        padding-top: 0;
221    }
222
223    .section_highlight + & {
224        padding-top: (@font-size-head6 / 2);
225    }
226}
227
228p {
229    font-size: @font-size-default;
230    line-height: 135%;
231
232    a,
233    span,
234    strong {
235        font-size: inherit;
236    }
237}
238
239label,
240legend,
241button {
242    font-size: @font-size-default;
243
244    a,
245    span,
246    strong {
247        font-size: inherit;
248    }
249}
250
251hr,
252figure,
253details,
254address {
255    font-size: @font-size-default;
256    line-height: 140%;
257}
258
259p,
260ul,
261ol,
262dl,
263pre,
264table,
265hr,
266blockquote,
267figure,
268details,
269fieldset,
270address {
271    margin: 0 0 1.4em; /* bottom margin = line-height */
272    padding: 0;
273}
274
275div,
276video,
277audio {
278    margin: 0;
279    padding: 0;
280}
281
282small,
283.code {
284    font-size: @font-size-small;
285}
286
287.code {
288    margin-top: @grid;
289}
290
291
292/*____________ lists ____________*/
293
294ul,
295ol {
296    font-size: @font-size-default;
297    line-height: 140%;
298    padding: 0 0 0 1.5em;
299}
300
301[dir=rtl] ul,
302[dir=rtl] ol {
303    padding: 0 1.5em 0 0;
304}
305
306li,
307dd {
308    padding: 0;
309    margin: 0 0 0 1.5em;
310}
311
312[dir=rtl] li,
313[dir=rtl] dd {
314    margin: 0 1.5em 0 0;
315}
316
317dl {
318    font-size: @font-size-default;
319    line-height: 140%;
320}
321
322dt {
323    font-weight: bold;
324    margin: 0;
325    padding: 0;
326}
327
328li ul,
329li ol,
330li dl,
331dl ul,
332dl ol,
333dl dl {
334    margin-bottom: 0;
335    padding: 0;
336}
337
338li li {
339    font-size: 100%;
340}
341
342ul {
343    list-style: square outside;
344}
345
346ol {
347    list-style: decimal outside;
348}
349
350ol ol {
351    list-style-type: lower-alpha;
352}
353
354ol ol ol {
355    list-style-type: upper-roman;
356}
357
358ol ol ol ol {
359    list-style-type: upper-alpha;
360}
361
362ol ol ol ol ol {
363    list-style-type: lower-roman;
364}
365
366
367/*____________ tables ____________*/
368
369.dokuwiki {
370    table.inline tr:hover {
371        th {
372            background-color: fade(@ini_background_alt, 50%);
373        }
374
375        td {
376            background-color: fade(@ini_background_alt, 80%);
377            color: @ini_text_alt;
378
379            *:not(button,a) {
380                color: @ini_text_alt;
381            }
382        }
383    }
384}
385
386table {
387    border-collapse: collapse;
388    empty-cells: show;
389    border-spacing: 0;
390    border: 1px solid @ini_border;
391    font-size: @font-size-default;
392    line-height: 140%;
393}
394
395caption {
396    caption-side: top;
397    text-align: left;
398}
399
400[dir=rtl] caption {
401    text-align: right;
402}
403
404th,
405td {
406    padding: .3em .5em;
407    margin: 0;
408    vertical-align: top;
409    border: 1px solid @ini_border;
410}
411
412th {
413    font-weight: bold;
414    background-color: @ini_background_alt;
415    color: @ini_text_alt;
416    text-align: left;
417}
418
419[dir=rtl] th {
420    text-align: right;
421}
422
423a {
424    outline: none;
425
426    &:link,
427    &:visited {
428        text-decoration: none;
429        color: @ini_link; // links to non wikipages (external links)
430    }
431
432    &:hover,
433    &:focus,
434    &:active {
435        text-decoration: underline;
436    }
437}
438
439img {
440    display: inline-block;
441    border-width: 0;
442    vertical-align: middle;
443    color: #666;
444    background-color: transparent;
445    font-style: italic;
446    height: auto;
447}
448
449img,
450object,
451embed,
452iframe,
453video,
454audio {
455    max-width: 100%;
456}
457
458button img {
459    max-width: none;
460}
461
462hr {
463    border-top: solid @ini_border;
464    border-bottom: solid @ini_background;
465    border-width: 1px 0;
466    height: 0;
467    text-align: center;
468    clear: both;
469}
470
471acronym,
472abbr {
473    cursor: help;
474    border-bottom: 1px dotted;
475    font-style: normal;
476}
477
478em acronym,
479em abbr {
480    font-style: italic;
481}
482
483mark {
484    background-color: @ini_highlight;
485    color: @ini_highlight_text;
486}
487
488pre,
489code,
490samp,
491kbd {
492    font-family: Consolas, "Andale Mono WT", "Andale Mono", "Bitstream Vera Sans Mono", "Nimbus Mono L", Monaco, "Courier New", monospace;
493    /* same font stack should be used for ".dokuwiki table.diff td" in _diff.css */
494    font-size: @font-size-default;
495    direction: ltr;
496    text-align: left;
497    background-color: @noopentasks-background;
498    color: @noopentasks-color;
499    box-shadow: inset 0 0 .3em @noopentasks-border;
500    border-radius: @fix_border-radius;
501    padding-left: @small-spacing;
502    padding-right: @small-spacing;
503}
504
505pre {
506    overflow: auto;
507    word-wrap: normal;
508    background-color: @noopentasks-background;
509    border: 1px solid @noopentasks-border;
510    border-radius: @fix_border-radius;
511    box-shadow: inset 0 0 .5em @noopentasks-border;
512    font-size: @font-size-default;
513    line-height: 140%;
514    padding: .7em 1em;
515}
516
517blockquote {
518    border: solid @ini_border;
519    border-width: 0 0 0 .25em;
520    font-size: @font-size-default;
521    line-height: 140%;
522    padding: 0 .5em;
523}
524
525[dir=rtl] blockquote {
526    border-width: 0 .25em 0 0;
527}
528
529q:before,
530q:after {
531    content: '';
532}
533
534sub,
535sup {
536    font-size: .8em;
537    line-height: 1;
538}
539
540sub {
541    vertical-align: sub;
542}
543
544sup {
545    vertical-align: super;
546}
547
548small {
549    font-size: .9em;
550}
551