xref: /template/sprintdoc/css/base_design.less (revision e02f5e315d288ff661805866149227988f612357)
1/**
2 * This file provides the main design styles
3 * across all template elements (typo, colors etc.)
4 */
5
6
7html, body {
8    background-color: @ini_background_site;
9}
10
11/* highlight selected tool */
12.mode_admin a.action.admin,
13.mode_login a.action.login,
14.mode_register a.action.register,
15.mode_profile a.action.profile,
16.mode_recent a.action.recent,
17.mode_index a.action.index,
18.mode_media a.action.media,
19.mode_revisions a.action.revs,
20.mode_backlink a.action.backlink,
21.mode_subscribe a.action.subscribe {
22    font-weight: bold;
23}
24
25.dokuwiki {
26    .page ol li,
27    .page ul li,
28    .aside ul li {
29        color: @ini_text;
30    }
31
32    .pageId {
33        float: right;
34        margin-right: -1em;
35        margin-bottom: -1px;
36        margin-top: -1.5em;
37        overflow: hidden;
38        padding: 0.5em 1em 0;
39
40        span {
41            font-size: @font-size-small;
42            border: solid @ini_background_alt;
43            border-width: 1px 1px 0;
44            background-color: @ini_background_site;
45            color: @ini_text_alt;
46            padding: .1em .35em;
47            border-top-left-radius: 2px;
48            border-top-right-radius: 2px;
49            box-shadow: 0 0 .5em @ini_text_alt;
50            display: block;
51        }
52    }
53
54    div.page {
55        clear: both;
56        overflow: hidden;
57        word-wrap: break-word;
58        background: @ini_background;
59        color: inherit;
60        padding: @page_padding-top @margin-default @margin-default;
61
62        @media @screen_max-md {
63            padding-right: (@margin-default * 1.6);
64        }
65
66        @media @screen_max-xs {
67            padding-left: @margin-small;
68        }
69
70        @media @screen_max-xxs {
71            padding-right: @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/* + + +  lists   + + + */
346ul,
347ol {
348    font-size: @font-size-default;
349    line-height: 140%;
350    padding: 0 0 0 1.5em;
351}
352
353[dir=rtl] ul,
354[dir=rtl] ol {
355    padding: 0 1.5em 0 0;
356}
357
358li,
359dd {
360    padding: 0;
361    margin: 0 0 0 1.5em;
362}
363
364[dir=rtl] li,
365[dir=rtl] dd {
366    margin: 0 1.5em 0 0;
367}
368
369dl {
370    font-size: @font-size-default;
371    line-height: 140%;
372}
373
374dt,
375dd {
376    line-height: inherit;
377}
378
379dt {
380    font-weight: bold;
381    margin: 0;
382    padding: 0;
383}
384
385li ul,
386li ol,
387li dl,
388dl ul,
389dl ol,
390dl dl {
391    margin-bottom: 0;
392    padding: 0;
393}
394
395li li {
396    font-size: 100%;
397}
398
399ul {
400    list-style: square outside;
401}
402
403ol {
404    list-style: decimal outside;
405}
406
407ol ol {
408    list-style-type: lower-alpha;
409}
410
411ol ol ol {
412    list-style-type: upper-roman;
413}
414
415ol ol ol ol {
416    list-style-type: upper-alpha;
417}
418
419ol ol ol ol ol {
420    list-style-type: lower-roman;
421}
422
423/* + + +  tables   + + + */
424.dokuwiki {
425    table.inline tr:hover {
426        th {
427            background-color: fade(@ini_background_alt, 50%);
428        }
429
430        td {
431            background-color: fade(@ini_background_alt, 80%);
432            color: @ini_text_alt;
433
434            *:not(button,a) {
435                color: @ini_text_alt;
436            }
437        }
438    }
439}
440
441table {
442    border-collapse: collapse;
443    empty-cells: show;
444    border-spacing: 0;
445    border: 1px solid @ini_border;
446    font-size: @font-size-default;
447    line-height: 140%;
448}
449
450caption {
451    caption-side: top;
452    text-align: left;
453}
454
455[dir=rtl] caption {
456    text-align: right;
457}
458
459th,
460td {
461    padding: .3em .5em;
462    margin: 0;
463    vertical-align: top;
464    border: 1px solid @ini_border;
465}
466
467th {
468    font-weight: bold;
469    background-color: @ini_background_alt;
470    color: @ini_text_alt;
471    text-align: left;
472
473    a {
474        color: @ini_link_alt;
475    }
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_site;
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