-
-
Notifications
You must be signed in to change notification settings - Fork 103
/
Copy pathstyle.css
188 lines (155 loc) · 3.52 KB
/
style.css
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
/*
Import Fira Code and Inter main stylesheets
This is broken when locally deploying with "mdbook serve"
because site-url is not used. Remove "/pandocs" to make it work
*/
@import "../fonts/fira_code.css";
@import "../fonts/inter.css";
html {
font-family: "Inter", sans-serif;
}
@supports (font-variation-settings: normal) {
html {
font-family: "Inter var", sans-serif;
}
}
@supports (font-variation-settings: normal) {
code {
font-family: "Fira Code", monospace;
}
}
body {
font-family: "Inter";
/* Enable some font features for Inter (https://rsms.me/inter/#features/calt) */
font-feature-settings: "ss01", /* Alternate (Open) digits */ "ss02",
/* Disambiguation gliphs */ "case";
/* Case alternates */
letter-spacing: -0.005em;
/* equals -0.5% */
}
button {
font-family: inherit;
}
table {
font-feature-settings: "tnum", /* Tabular numbers */ "ss01",
/* Alternate (Open) digits */ "ss02", /* Disambiguation gliphs */ "case";
/* Case alternates */
}
th {
text-align: center;
}
code {
/* "!important" needed because https://github.com/rust-lang/mdBook/issues/1552 */
font-family: "Fira Code", monospace !important;
font-size: 0.85em;
font-weight: 500;
}
.pixelated {
-ms-interpolation-mode: nearest-neighbor;
image-rendering: crisp-edges;
image-rendering: pixelated;
}
.header {
font-weight: 600;
}
.menu-title {
font-weight: 400;
font-size: 2.75rem;
letter-spacing: -0.02em;
/* equals -2% */
}
.box {
margin: 20px 0;
padding: 1.6px 20px;
border-left-width: 0.75rem;
border-left-style: solid;
}
.box > .box-title {
font-weight: 600;
text-transform: uppercase;
}
.tip-box {
border-color: #42b983;
background-color: var(--quote-bg);
}
.warning-box {
border-left-color: var(--c-warning);
background-color: rgba(255, 229, 100, 0.2);
color: var(--c-warning-text);
}
.warning-box > .box-title {
color: var(--c-warning-title);
}
.danger-box {
border-left-color: var(--c-danger);
background-color: rgba(255, 0, 0, .15);
color: var(--c-danger-text);
}
.danger-box > .box-title {
color: var(--c-danger-title);
}
.spacer {
width: 100%;
height: 3px;
margin: 25px 0px 25px 0px;
}
/* Global CSS variables */
:root {
/* (Override) workaround to get hover+active sidebar links on normal links blue */
--sidebar-active: var(--links);
/* Warning boxes base styling */
--c-warning: #e7c000;
--c-warning-bg: #fffae3;
--c-warning-title: #ad9000;
/* Danger boxes base styling */
--c-danger: #cc0000;
--c-danger-text: #660000;
--c-danger-title: #990000;
}
/* Theme-wide CSS variables */
.ayu {
--c-warning-text: #eac100;
--c-danger-text: #ff2929;
--c-danger-title: #dc0000;
}
.coal {
--c-warning-text: #eac100;
--c-danger-text: #ff2929;
--c-danger-title: #dc0000;
}
.light {
--c-warning-text: #746000;
}
.navy {
--c-warning-text: #eac100;
--c-danger-text: #ff2929;
--c-danger-title: #dc0000;
}
.rust {
--c-warning-text: #ad8e00;
}
/* Avoid text being squished too much in fractions */
math[display="block"], mfrac {
font-size: 2rem;
}
mfrac msup :not(:first-child) {
font-size: 1.8rem;
}
.bit-descrs {
text-align: center;
}
.bit-descrs th {
padding: 3px 10px;
}
/* mdBook aligns the first column, but this is not desirable for those tables */
.bit-descrs.nameless td:first-child {
text-align: center;
}
/* Improve contrast on bit-descrs borders */
.bit-descrs {
--table-border-color: var(--table-header-bg);
}
p, .table-wrapper {
margin-block-start: 1em;
margin-block-end: 1em;
}