xref: /template/sprintdoc/css/base_design.less (revision 98451cac1cf377f768582adbf26415ade367f358)
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    div[class^="level"] + &,
159    .section_highlight &:first-child {
160        padding-top: 0;
161    }
162
163    .section_highlight + & {
164        padding-top: (@font-size-head2 / 2);
165    }
166}
167
168h3 {
169    font-size: @font-size-head3;
170    margin: 0 0 @font-size-head3;
171    padding-top: (@font-size-head3 / 2);
172
173    .secedit + &,
174    div[class^="level"] + &,
175    .section_highlight &:first-child {
176        padding-top: 0;
177    }
178
179    .section_highlight + & {
180        padding-top: (@font-size-head3 / 2);
181    }
182}
183
184h4 {
185    font-size: @font-size-head4;
186    margin: 0 0 @font-size-head4;
187    padding-top: (@font-size-head4 / 2);
188
189    .secedit + &,
190    div[class^="level"] + &,
191    .section_highlight &:first-child {
192        padding-top: 0;
193    }
194
195    .section_highlight + & {
196        padding-top: (@font-size-head4 / 2);
197    }
198}
199
200h5 {
201    font-size: @font-size-head5;
202    margin: 0 0 @font-size-head5;
203    padding-top: (@font-size-head5 / 2);
204
205    .secedit + &,
206    div[class^="level"] + &,
207    .section_highlight &:first-child {
208        padding-top: 0;
209    }
210
211    .section_highlight + & {
212        padding-top: (@font-size-head5 / 2);
213    }
214}
215
216h6 {
217    font-size: @font-size-head6;
218    font-weight: @font-weight-bold;
219    margin: 0 0 @font-size-head6;
220    padding-top: (@font-size-head6 / 2);
221
222    .secedit + &,
223    div[class^="level"] + &,
224    .section_highlight &:first-child {
225        padding-top: 0;
226    }
227
228    .section_highlight + & {
229        padding-top: (@font-size-head6 / 2);
230    }
231}
232
233p {
234    font-size: @font-size-default;
235    line-height: @line-height-big;
236
237    a,
238    span,
239    strong {
240        font-size: inherit;
241    }
242}
243
244label,
245legend,
246button {
247    font-size: @font-size-default;
248
249    a,
250    span,
251    strong {
252        font-size: inherit;
253    }
254}
255
256hr,
257figure,
258details,
259address {
260    font-size: @font-size-default;
261    line-height: 140%;
262}
263
264p,
265ul,
266ol,
267dl,
268pre,
269table,
270hr,
271blockquote,
272figure,
273details,
274fieldset,
275address {
276    margin: 0 0 1.4em; /* bottom margin = line-height */
277    padding: 0;
278}
279
280div,
281video,
282audio {
283    margin: 0;
284    padding: 0;
285}
286
287small,
288.code {
289    font-size: @font-size-small;
290}
291
292.code {
293    margin-top: @grid;
294
295    // SPR-926: darker colors for accessibility
296    .es6 {
297        color: #00832B;
298    }
299
300    .kw5 {
301        color: #005D00;
302    }
303
304    .kw6 {
305        color: #DC0075;
306    }
307
308    .nu0 {
309        color: #A74DA7;
310    }
311
312    .re3 {
313        color: #DE1B1B;
314    }
315
316    .re4 {
317        color: #007F6F;
318    }
319
320    .br0, .sy0 {
321        color: #248124;
322    }
323
324    .co1, .coMULTI, .sc-1 {
325        color: #707070;
326    }
327
328    .co2, .sy1 {
329        color: #108400;
330    }
331
332    .co3, .sy4 {
333        color: #008070;
334    }
335
336    .kw1, .kw8 {
337        color: #747400;
338    }
339
340    .re1, .st0, .st_h {
341        color: #DD0000;
342    }
343}
344
345
346/*____________ lists ____________*/
347
348ul,
349ol {
350    font-size: @font-size-default;
351    line-height: 140%;
352    padding: 0 0 0 1.5em;
353}
354
355[dir=rtl] ul,
356[dir=rtl] ol {
357    padding: 0 1.5em 0 0;
358}
359
360li,
361dd {
362    padding: 0;
363    margin: 0 0 0 1.5em;
364}
365
366[dir=rtl] li,
367[dir=rtl] dd {
368    margin: 0 1.5em 0 0;
369}
370
371dl {
372    font-size: @font-size-default;
373    line-height: 140%;
374}
375
376dt,
377dd {
378    line-height: inherit;
379}
380
381dt {
382    font-weight: bold;
383    margin: 0;
384    padding: 0;
385}
386
387li ul,
388li ol,
389li dl,
390dl ul,
391dl ol,
392dl dl {
393    margin-bottom: 0;
394    padding: 0;
395}
396
397li li {
398    font-size: 100%;
399}
400
401ul {
402    list-style: square outside;
403}
404
405ol {
406    list-style: decimal outside;
407}
408
409ol ol {
410    list-style-type: lower-alpha;
411}
412
413ol ol ol {
414    list-style-type: upper-roman;
415}
416
417ol ol ol ol {
418    list-style-type: upper-alpha;
419}
420
421ol ol ol ol ol {
422    list-style-type: lower-roman;
423}
424
425
426/*____________ tables ____________*/
427
428.dokuwiki {
429    table.inline tr:hover {
430        th {
431            background-color: fade(@ini_background_alt, 50%);
432        }
433
434        td {
435            background-color: fade(@ini_background_alt, 80%);
436            color: @ini_text_alt;
437
438            *:not(button,a) {
439                color: @ini_text_alt;
440            }
441        }
442    }
443}
444
445table {
446    border-collapse: collapse;
447    empty-cells: show;
448    border-spacing: 0;
449    border: 1px solid @ini_border;
450    font-size: @font-size-default;
451    line-height: 140%;
452}
453
454caption {
455    caption-side: top;
456    text-align: left;
457}
458
459[dir=rtl] caption {
460    text-align: right;
461}
462
463th,
464td {
465    padding: .3em .5em;
466    margin: 0;
467    vertical-align: top;
468    border: 1px solid @ini_border;
469}
470
471th {
472    font-weight: bold;
473    background-color: @ini_background_alt;
474    color: @ini_text_alt;
475    text-align: left;
476}
477
478[dir=rtl] th {
479    text-align: right;
480}
481
482a {
483    outline: none;
484
485    &:link,
486    &:visited {
487        text-decoration: none;
488        color: @ini_link; // links to non wikipages (external links)
489    }
490
491    &:hover,
492    &:focus,
493    &:active {
494        text-decoration: underline;
495    }
496}
497
498img {
499    display: inline-block;
500    border-width: 0;
501    vertical-align: middle;
502    color: #666;
503    background-color: transparent;
504    font-style: italic;
505    height: auto;
506}
507
508img,
509object,
510embed,
511iframe,
512video,
513audio {
514    max-width: 100%;
515}
516
517button img {
518    max-width: none;
519}
520
521hr {
522    border-top: solid @ini_border;
523    border-bottom: solid @ini_background;
524    border-width: 1px 0;
525    height: 0;
526    text-align: center;
527    clear: both;
528}
529
530acronym,
531abbr {
532    cursor: help;
533    border-bottom: 1px dotted;
534    font-style: normal;
535}
536
537em acronym,
538em abbr {
539    font-style: italic;
540}
541
542mark {
543    background-color: @ini_highlight;
544    color: @ini_highlight_text;
545}
546
547pre,
548code,
549samp,
550kbd {
551    font-family: Consolas, "Andale Mono WT", "Andale Mono", "Bitstream Vera Sans Mono", "Nimbus Mono L", Monaco, "Courier New", monospace;
552    /* same font stack should be used for ".dokuwiki table.diff td" in _diff.css */
553    font-size: @font-size-default;
554    direction: ltr;
555    text-align: left;
556    background-color: @code-background;
557    color: @noopentasks-color;
558    box-shadow: inset 0 0 .3em @noopentasks-border;
559    border-radius: @fix_border-radius;
560    padding-left: @small-spacing;
561    padding-right: @small-spacing;
562
563    * {
564        font-family: inherit;
565        font-size: inherit;
566    }
567
568    span {
569        color: inherit;
570    }
571
572    a {
573        &:link,
574        &:visited {
575            color: inherit;
576            text-decoration: underline;
577        }
578
579        &:hover,
580        &:focus,
581        &:active {
582            text-decoration: none;
583        }
584    }
585}
586
587pre {
588    overflow: auto;
589    word-wrap: normal;
590    border: 1px solid @noopentasks-border;
591    font-size: @font-size-default;
592    line-height: 140%;
593    padding: .7em 1em;
594}
595
596code:not([class]) {
597    display: inline-block;
598}
599
600blockquote {
601    border: solid @ini_border;
602    border-width: 0 0 0 .25em;
603    font-size: @font-size-default;
604    line-height: 140%;
605    padding: 0 .5em;
606}
607
608[dir=rtl] blockquote {
609    border-width: 0 .25em 0 0;
610}
611
612q:before,
613q:after {
614    content: '';
615}
616
617sub,
618sup {
619    font-size: .8em;
620    line-height: 1;
621}
622
623sub {
624    vertical-align: sub;
625}
626
627sup {
628    vertical-align: super;
629}
630
631small {
632    font-size: .9em;
633}
634