xref: /template/ad-hominem/css/_footnotes.css (revision 9a22688fd82549fdced43db5ebd85a95637a4765)
1/**
2 * This file provides styles for footnotes.
3 */
4
5/* pre-defined custom footnote styles */
6
7@counter-style: ~"@counter-style";
8@{counter-style} super-decimal {
9	system: numeric;
10	symbols: '\2070' '\B9' '\B2' '\B3' '\2074' '\2075' '\2076' '\2077' '\2078' '\2079';
11	/* symbols: '⁰' '¹' '²' '³' '⁴' '⁵' '⁶' '⁷' '⁸' '⁹'; */
12}
13
14/* create a custom counter for the footnotes: */
15body, div.footnotes {
16    counter-reset: footnotes;
17}
18
19/*____________ footnotes inside the text ____________*/
20
21/* link to footnote inside the text */
22
23.dokuwiki sup { /* ignore superscript tags! */
24	vertical-align: baseline;
25	font-size: inherit;
26}
27.dokuwiki sup a.fn_top {
28
29	& {
30		padding: 0 .5pt;
31		font-size: 0;text-decoration: none;
32	}
33	&::after {
34		content: counter(footnotes, super-decimal);
35		counter-increment: footnotes;
36		font-size: 1.1667rem;
37		font-weight: bold;
38	}
39}
40
41/* JSpopup */
42div.insitu-footnote {
43	max-width: 40%;
44	min-width: 5em;
45}
46
47/*____________ footnotes at the bottom of the page ____________*/
48
49.dokuwiki div.footnotes {
50	& {
51		border-top: 1px solid @ini_border;
52		padding: .5em 0 0 0;
53		margin: 1em 0 0 0;
54		clear: both;
55	}
56	> .fn {
57		& {
58			margin: 0 0 0 2.5rem !important;
59			white-space-collapse: discard;
60			text-indent: ~"calc(-2.5rem - .3em)"; /* compensate for the whitespace character! */
61		}
62		sup { /* ignore superscript tags! */
63			vertical-align: baseline;
64			font-size: 1em;
65		}
66		.fn_bot {
67			& {
68				display: inline-block;
69				text-align: right;
70				margin: 0 .5rem 0 0;
71				width: 2rem; height: .972rem;
72				font-variant-numeric: oldstyle-nums;
73				font-size: 0;
74			}
75			&::after {
76				content: counter(footnotes, decimal) '.';
77				counter-increment: footnotes;
78				display: inline-block;
79				font-size: .972rem;
80				width: 2rem;
81			}
82		}
83		& > .content {
84			display: inline;
85		}
86	}
87}
88
89[dir=rtl] .dokuwiki div.footnotes > .fn {
90    margin: 0 2.5em 0 0;
91}
92[dir=rtl] .dokuwiki div.footnotes > .fn .fn_bot {
93	text-align: left;
94	margin: 0 0 0 .5em;
95}