xref: /template/ad-hominem/css/_footnotes.css (revision 03583c1adbbe9c37ec5bdc57a59295c92ac2079e)
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, .dokuwiki sub {ignore subscript and superscript tags!
24	vertical-align: baseline;
25	font-size: inherit;
26} */
27.dokuwiki sup a.fn_top {
28
29	& {
30		vertical-align: baseline;
31		font-size: inherit;
32		padding: 0 .5pt;
33		font-size: 0;text-decoration: none;
34	}
35	&::after {
36		content: counter(footnotes, super-decimal);
37		counter-increment: footnotes;
38		font-size: 1.1667rem;
39		font-weight: bold;
40		vertical-align: -.2em;
41	}
42}
43
44/* JSpopup */
45div.insitu-footnote {
46	max-width: 40%;
47	min-width: 5em;
48}
49
50/*____________ footnotes at the bottom of the page ____________*/
51
52.dokuwiki div.footnotes {
53	& {
54		border-top: 1px solid @ini_border;
55		padding: .5em 0 0 0;
56		margin: 1em 0 0 0;
57		clear: both;
58	}
59	> .fn {
60		& {
61			margin: 0 0 0 2.5rem !important;
62			white-space-collapse: discard;
63			text-indent: ~"calc(-2.5rem - .3em)"; /* compensate for the whitespace character! */
64		}
65		sup { /* ignore superscript tags! */
66			vertical-align: baseline;
67			font-size: 1em;
68		}
69		.fn_bot {
70			& {
71				display: inline-block;
72				text-align: right;
73				margin: 0 .5rem 0 0;
74				width: 2rem; height: .972rem;
75				font-variant-numeric: oldstyle-nums;
76				font-size: 0;
77			}
78			&::after {
79				content: counter(footnotes, decimal) '.';
80				counter-increment: footnotes;
81				font-variant-numeric: oldstyle-nums;
82				display: inline-block;
83				font-size: .972rem;
84				width: 2rem;
85			}
86		}
87		& > .content {
88			display: inline;
89		}
90	}
91}
92
93[dir=rtl] .dokuwiki div.footnotes > .fn {
94    margin: 0 2.5em 0 0;
95}
96[dir=rtl] .dokuwiki div.footnotes > .fn .fn_bot {
97	text-align: left;
98	margin: 0 0 0 .5em;
99}