aboutsummaryrefslogtreecommitdiffstats
path: root/src/css/custom.css
blob: 29a89b521ae49754a66f04ccf493f0c14087c45c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
/*
 * SPDX-FileCopyrightText: 2023 Kristóf Marussy
 *
 * SPDX-License-Identifier: MIT
 */

/**
 * Any CSS included here will be global. The classic template
 * bundles Infima by default. Infima is a CSS framework designed to
 * work well for content-centric websites.
 */

@import 'katex/dist/katex.css';

@import './fonts.css';
@import './sr-only.css';

/* You can override the default Infima variables here. */
:root {
  --ifm-font-family-base: 'Recursive Variable', sans-serif;
  --ifm-font-family-monospace: var(--ifm-font-family-base);
  --ifm-color-primary: #1e6be6;
  --ifm-color-primary-dark: #175fd3;
  --ifm-color-primary-darker: #165ac7;
  --ifm-color-primary-darkest: #124aa4;
  --ifm-color-primary-light: #357ae9;
  --ifm-color-primary-lighter: #4182ea;
  --ifm-color-primary-lightest: #6499ee;
  --ifm-code-font-size: 95%;
  --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
  --mono: 0;
  --casl: 0;
  --slnt: 0;
  --crsv: 0.5;
  --marussy-heading-tracking: -0.031em;
  --marussy-button-tracking: -0.026em;
  --marussy-slightly-casl: 0.25;
  --marussy-very-bold: 800;
}

/* For readability concerns, you should choose a lighter palette in dark mode. */
[data-theme='dark'] {
  --ifm-color-primary: #4285f4;
  --ifm-color-primary-dark: #2572f2;
  --ifm-color-primary-darker: #1669f1;
  --ifm-color-primary-darkest: #0c55cd;
  --ifm-color-primary-light: #5f98f6;
  --ifm-color-primary-lighter: #6ea1f7;
  --ifm-color-primary-lightest: #9abef9;
  --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
}

@media (max-width: 576px) {
  :root {
    --marussy-very-bold: var(--ifm-heading-font-weight);
  }
}

* {
  /*
   * We must use `!important` here, because Infima sometimes sets font
   * properties with `font:`, which would normally overwrite these rules.
   */
  font-variation-settings:
    'MONO' var(--mono),
    'CASL' var(--casl),
    'slnt' var(--slnt),
    'CRSV' var(--crsv) !important;
  font-feature-settings:
    /* Use single-story g in body text. */
    'ss02' calc(1 - min(var(--casl) * 1000, 1)),
    /* Simplified l in code. */ 'ss05' 1,
    /* Dotted zero in code. */ 'ss10'
      calc(clamp(0, var(--mono) * 1000 - 500, 1)),
    /* Simplified @ in code. */ 'ss12'
      calc(clamp(0, var(--mono) * 1000 - 500, 1)),
    /* No descender for Q in titles. */ 'titl' calc(min(var(--casl) * 1000, 1)) !important;
}

i,
em {
  --slnt: -15;
}

code,
kbd {
  --mono: 1;
}

h1,
h2,
.markdown > h3,
.button {
  --casl: 1;
}

h3,
.markdown > h4,
.avatar__name {
  --casl: var(--marussy-slightly-casl);
}

h1,
h2,
h3,
.avatar__name {
  letter-spacing: var(--marussy-heading-tracking);
}

.button--lg {
  letter-spacing: var(--marussy-button-tracking);
}

.hash-link {
  font-weight: 500;
  --casl: 0;
  --mono: 1;
}

.hero__title {
  font-weight: var(--marussy-very-bold);
}

.hero__subtitle {
  font-weight: 500;
}

.footnotes {
  margin-top: 3rem;
  padding-top: var(--ifm-hr-margin-vertical);
  border-top: var(--ifm-hr-height) solid var(--ifm-hr-background-color);
}

.markdown > .footnotes ol,
.markdown > .footnotes li:last-of-type :last-of-type {
  margin-bottom: 0;
}

.katex-display {
  overflow-y: auto;
}