summaryrefslogtreecommitdiff
path: root/sysret.org/themes/tabi-lean/sass/main.scss
blob: 6433d2c2c545d97709088fea338737ffe3f1c4fd (plain)
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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
@use 'parts/_admonitions.scss';
@use 'parts/_archive.scss';
@use 'parts/_aside.scss';
@use 'parts/_cards.scss';
@use 'parts/_code.scss';
@use 'parts/_comments.scss';
@use 'parts/_footer.scss';
@use 'parts/_header-anchor.scss';
@use 'parts/_header.scss';
@use 'parts/_home-banner.scss';
@use 'parts/_iine.scss';
@use 'parts/_image-hover.scss';
@use 'parts/_image-toggler.scss';
@use 'parts/_image.scss';
@use 'parts/_misc.scss';
@use 'parts/_multilingual_quote.scss';
@use 'parts/_pagination.scss';
@use 'parts/_posts_list.scss';
@use 'parts/_quick_navigation_buttons.scss';
@use 'parts/_search.scss';
@use 'parts/_spoiler.scss';
@use 'parts/_syntax_theme.scss';
@use 'parts/_table.scss';
@use 'parts/_tags.scss';
@use 'parts/_theme-switch.scss';
@use 'parts/_webmention.scss';
@use 'parts/_zola-error.scss';

@font-face {
    src: local('JetBrainsMono'),
        url('fonts/JetBrainsMonoNLNerdFont-Regular.ttf') format("truetype");
    font-family: 'JetBrainsMono';
    font-display: swap;
}

@mixin theme-variables($theme) {
    @if $theme =='light' {
        --background-color: white;
        --bg-0: #f0f0f0;
        --bg-1: #e7e7e7;
        --bg-2: #fefefe;
        --bg-3: #d8dcdd;
        --hover-color: white;
        --primary-color: #087E96;
        --divider-color: #d7d7d7;
        --text-color: #222226;
        --text-color-high-contrast: #313333;
        --meta-color: #5b5b65;
        --codeblock-bg: #26232e;
        --codeblock-highlight: #383444;
        --theme-switcher-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z'/%3E%3C/svg%3E%0A");
        color-scheme: light;
    }

    @else {
        --background-color: #1f1f1f;
        --bg-0: #2f2f2f;
        --bg-1: #3c3c3c;
        --bg-2: #171717;
        --bg-3: #535555;
        --hover-color: black;
        --primary-color: #91e0ee;
        --divider-color: #4a4a4a;
        --text-color: #D4D4D4;
        --text-color-high-contrast: #eceeef;
        --meta-color: #B0B0B0;
        --codeblock-bg: #19181e;
        --codeblock-highlight: #282834;
        --theme-switcher-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 96 960 960' %3E%3Cpath d='M480 776q-83 0-141.5-58.5T280 576q0-83 58.5-141.5T480 376q83 0 141.5 58.5T680 576q0 83-58.5 141.5T480 776ZM80 616q-17 0-28.5-11.5T40 576q0-17 11.5-28.5T80 536h80q17 0 28.5 11.5T200 576q0 17-11.5 28.5T160 616H80Zm720 0q-17 0-28.5-11.5T760 576q0-17 11.5-28.5T800 536h80q17 0 28.5 11.5T920 576q0 17-11.5 28.5T880 616h-80ZM480 296q-17 0-28.5-11.5T440 256v-80q0-17 11.5-28.5T480 136q17 0 28.5 11.5T520 176v80q0 17-11.5 28.5T480 296Zm0 720q-17 0-28.5-11.5T440 976v-80q0-17 11.5-28.5T480 856q17 0 28.5 11.5T520 896v80q0 17-11.5 28.5T480 1016ZM226 378l-43-42q-12-11-11.5-28t11.5-29q12-12 29-12t28 12l42 43q11 12 11 28t-11 28q-11 12-27.5 11.5T226 378Zm494 495-42-43q-11-12-11-28.5t11-27.5q11-12 27.5-11.5T734 774l43 42q12 11 11.5 28T777 873q-12 12-29 12t-28-12Zm-42-495q-12-11-11.5-27.5T678 322l42-43q11-12 28-11.5t29 11.5q12 12 12 29t-12 28l-43 42q-12 11-28 11t-28-11ZM183 873q-12-12-12-29t12-28l43-42q12-11 28.5-11t27.5 11q12 11 11.5 27.5T282 830l-42 43q-11 12-28 11.5T183 873Z'/%3E%3C/svg%3E");
        color-scheme: dark;
    }
}

:root {
    @include theme-variables('light');

    --max-layout-width: 1000px;
    --normal-layout-width: 600px;
    --medium-layout-width: 400px;
    --small-layout-width: 200px;
    --paragraph-spacing: max(2.3vmin, 24px);

    --sans-serif-font: 'JetBrainsMono', Helvetica, Arial, sans-serif;
    --serif-font: 'JetBrainsMono', 'Georgia', serif;
    --code-font: 'JetBrainsMono';

    scrollbar-color: var(--primary-color) transparent;
    accent-color: var(--primary-color);

    line-height: 190%;
    font-family: var(--sans-serif-font);
}

[data-theme='dark'] {
    @include theme-variables('dark');

    .invertible-image {
        filter: invert(.88);
    }

    .dimmable-image {
        filter: brightness(.8) contrast(1.2);
    }
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme='light']) {
        @include theme-variables('dark');

        .invertible-image {
            filter: invert(.88);
        }

        .dimmable-image {
            filter: brightness(.8) contrast(1.2);
        }
    }
}

html {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6em;
    text-rendering: optimizeLegibility;
}

body {
    display: flex;
    flex-direction: column;
    margin-inline: 5vmin;
    margin-block: 0;
    min-height: 100vh;
}

.content {
    word-wrap: break-word;
    margin: 0 auto;
    margin-top: 6vmin;
    margin-block-end: 4rem;
    width: 100%;
    max-width: var(--max-layout-width);
}

.use-sans-serif {
    --serif-font: var(--sans-serif-font);
}

article {
    $base-margin: 6rem;
    position: relative;
    margin: 0 auto;

    max-width: calc(var(--max-layout-width) - 2*$base-margin);

    p,
    li,
    details,
    summary {
        font-family: var(--serif-font);
    }

    strong {
        font-weight: 620;
    }

    .full-width {
        margin-inline-start: -$base-margin;
        margin-inline-end: -$base-margin;
        max-width: calc(100% + 2*$base-margin);
    }

    li {
        p:not(:last-child) {
            margin-block-end: 0;
        }

        p + :last-child {
            margin-block-end: var(--paragraph-spacing);
        }
    }
}

.section-title {
    display: flex;
    margin: 0;
    margin-top: -0.15em;
    color: var(--text-color-high-contrast);
    font-weight: 550;
    font-size: 2.2em;
    line-height: 1.2em;
}

.last-updated {
    margin-top: -5vmin;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    display: block;
    position: relative;
    margin: 0;
}

h1 {
    margin-top: 0.67em;
    font-weight: 550;
    font-size: 1.62rem;
}

h2 {
    margin-top: 0.5em;
    font-weight: 550;
    font-size: 1.4rem;
}

h3 {
    margin-top: 0.3em;
    font-weight: 550;
    font-size: 1.2rem;
}

h4 {
    margin-top: 0.83em;
    font-weight: 550;
    font-size: 1rem;
}

h5 {
    margin-top: 0.83em;
    font-weight: normal;
    font-size: 1rem;
}

p {
    margin-top: 0.4rem;
    margin-block-end: var(--paragraph-spacing);
    font-size: 1em;
    line-height: 2rem;
}

strong {
    font-weight: 580;
}

.centered-text {
    text-align: center;
}

video {
    max-width: 100%;
}

.center-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0;
    width: 100%;
    height: 100vh;
    text-align: center;
}

.subheader {
    margin-block-end: 2rem;
}

.mobile-only {
    display: none;
}

@media only screen and (max-width: 1000px) {
    .content {
        max-width: var(--normal-layout-width);
    }

    body {
        margin: 0 32px;
    }

    article .full-width {
        display: block;
        margin-inline-start: 0;
        margin-inline-end: 0;
        max-width: none;
        overflow-x: auto;
    }

    .mobile-only {
        display: block;
    }
}

@media only screen and (max-width: 600px) {
    .content {
        margin-top: 0rem;
        max-width: var(--medium-layout-width);
    }

    article {
        margin-top: 1.3rem;
    }

    body {
        margin-inline: 16px;
        margin-block: 0;
    }
}

@media only screen and (max-width: 300px) {
    .content {
        max-width: var(--small-layout-width);
    }
}

@media all and (min-width: 600px) {
    html {
        font-size: 16.5px;
    }
}

@media all and (min-width: 960px) {
    html {
        font-size: 20px;
    }
}