all repos

mugit @ d00a3f1

🐮 git server that your cow will love

mugit/web/static/style.css (view raw)

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
ui: fix code block padding in callouts, 2 months ago
1
:root {
2
  --white: #fff;
3
  --light: #f4f4f4;
4
  --cyan: #509c93;
5
  --light-gray: #eee;
6
  --medium-gray: #ddd;
7
  --gray: #6a6a6a;
8
  --dark: #444;
9
  --darker: #222;
10
  --diff-add: green;
11
  --diff-del: red;
12
  --sel-bg: rgba(0, 0, 0, 0.08);
13
14
  --sans-font: -apple-system, BlinkMacSystemFont, "Inter", "Roboto", "Segoe UI", sans-serif;
15
  --mono-font: "SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", "Roboto Mono", Menlo, Consolas, monospace;
16
}
17
18
@media (prefers-color-scheme: dark) {
19
  :root {
20
    color-scheme: dark light;
21
    --light: #181818;
22
    --cyan: #76c7c0;
23
    --light-gray: #333;
24
    --medium-gray: #444;
25
    --gray: #aaa;
26
    --dark: #ddd;
27
    --darker: #f4f4f4;
28
    --white: #000;
29
    --sel-bg: rgba(255, 255, 255, 0.08);
30
  }
31
}
32
33
* {
34
  box-sizing: border-box;
35
  padding: 0;
36
  margin: 0;
37
}
38
39
::selection { background: var(--medium-gray); }
40
41
html {
42
  background: var(--white);
43
  -webkit-text-size-adjust: none;
44
  -webkit-font-smoothing: antialiased;
45
  -moz-osx-font-smoothing: grayscale;
46
  font-family: var(--sans-font);
47
  font-weight: 400;
48
}
49
50
body {
51
  max-width: 1200px;
52
  padding: 0 13px;
53
  margin: 40px auto;
54
}
55
56
a {
57
  text-decoration: none;
58
  word-wrap: break-word;
59
  color: var(--darker);
60
  border-bottom: 0;
61
}
62
63
a:hover { border-bottom: 1.5px solid var(--gray); }
64
.link { border-bottom: 1.5px solid var(--medium-gray); }
65
66
pre {
67
  font-family: var(--mono-font);
68
  overflow-x: auto;
69
  tab-size: 4;
70
  -moz-tab-size: 4;
71
}
72
73
main, footer {
74
  padding: 0;
75
  line-height: 160%;
76
}
77
78
nav { padding: 0.4rem 0 1.5rem 0; }
79
nav ul {
80
  list-style: none;
81
  padding-bottom: 1.25rem;
82
}
83
84
nav ul li {
85
  padding-right: 10px;
86
  display: inline-block;
87
}
88
89
/* utilities */
90
.mono { font-family: var(--mono-font); }
91
.nowrap { white-space: nowrap; }
92
.fill { width: 100%; }
93
.muted { color: var(--gray); }
94
.pl { padding-left: 0.3rem; }
95
.pt { padding-top: 1rem; }
96
.mb { margin-bottom: 1rem; }
97
.center {
98
  display: flex;
99
  justify-content: center;
100
}
101
102
/* tables */
103
.table {
104
  width: 100%;
105
  border-collapse: collapse;
106
  table-layout: auto;
107
}
108
109
.table th {
110
  text-align: left;
111
  font-weight: 500;
112
  border-bottom: 1.5px solid var(--medium-gray);
113
  padding: 0.25em 0.5em;
114
}
115
116
.table td {
117
  border-bottom: 1px solid var(--light-gray);
118
  padding: 0.25em 0.5em;
119
  vertical-align: top;
120
}
121
122
.table tbody tr:hover { background: var(--light); }
123
.table tbody tr.nohover:hover { background: transparent; }
124
125
/* tooltip */
126
.tooltip {
127
  display: none;
128
  position: absolute;
129
  left: 0;
130
  top: 100%;
131
  margin-top: 0.25rem;
132
  padding: 0.5rem 0.7rem;
133
  background: var(--white);
134
  border: 1px solid var(--medium-gray);
135
  z-index: 10;
136
  font-size: 0.85em;
137
  line-height: 1.3;
138
  max-width: 48ch;
139
  white-space: nowrap;
140
}
141
142
.has-tip { position: relative; }
143
.has-tip:hover .tooltip,
144
.has-tip:focus-within .tooltip { display: block; }
145
146
/* box */
147
.box + .box { margin-top: 0.8rem; }
148
.box {
149
  background: var(--light-gray);
150
  padding: 0.6rem;
151
}
152
153
/* repo header */
154
.repo-header { margin-bottom: 1.25rem; }
155
.repo-header .desc { margin-top: 0.35rem; }
156
.repo-header .repo-nav { padding: 0.5rem 0 0 0; }
157
.repo-header .repo-nav ul { padding-bottom: 0; }
158
159
160
.repo-breadcrumb,
161
.repo-breadcrumb a { color: var(--gray); }
162
.repo-breadcrumb:before { content: "<"; }
163
164
.repo-name {
165
  font-size: 1.6rem;
166
  line-height: 1.1;
167
  margin-top: 0.25rem;
168
}
169
170
/* index page */
171
.index { margin-top: 2em; }
172
173
/* repo index */
174
.repo-index {
175
  display: flex;
176
  gap: 1.25rem;
177
  align-items: flex-start;
178
}
179
180
.repo-index-main { flex: 0 0 72ch; }
181
.repo-index-main .box { width: 100%; }
182
.repo-index-side {
183
  flex: 0 0 26rem;
184
  min-width: 0;
185
}
186
187
.repo-index-side h2 {
188
  font-size: 1.4rem;
189
  padding: 0;
190
}
191
192
/* log page */
193
.log td.has-tip .author-short {
194
  display: inline-block;
195
  max-width: 25ch;
196
  overflow: hidden;
197
  text-overflow: ellipsis;
198
  vertical-align: top;
199
}
200
201
/* tree */
202
.tree, .log, .repo-index { margin-bottom: 2em; }
203
204
/* file View */
205
.file-wrapper {
206
  display: flex;
207
  flex-direction: row;
208
  gap: 1rem;
209
  padding: 0 0.5rem;
210
  background: var(--light-gray);
211
  overflow-x: auto;
212
}
213
214
.file-contents {
215
  width: 100%;
216
  padding: 0.3em 0 0.3em 0;
217
}
218
219
.line-number {
220
  width: 1%;
221
  user-select: none;
222
  text-align: right;
223
  -webkit-user-select: none;
224
  -moz-user-select: none;
225
  -khtml-user-select: none;
226
  -o-user-select: none;
227
}
228
229
.line-number a:hover { border-bottom: none; }
230
.line-number a {
231
  color: var(--gray);
232
  display: block;
233
  padding: 0 1rem;
234
  text-decoration: none;
235
}
236
237
.line:has(a:target) { background-color: var(--sel-bg); }
238
239
.image-viewer, .binary-viewer { padding: 1rem 0; }
240
.image-viewer img {
241
  max-width: 100%;
242
  height: auto;
243
}
244
245
/* commit */
246
.commit { margin-bottom: 1rem; }
247
.commit .box { margin-bottom: 0.25rem; }
248
.commit .commit-info { padding-bottom: 0.25rem; }
249
.commit pre {
250
  padding-bottom: 0;
251
  white-space: pre-wrap;
252
}
253
254
.commit-message {
255
  margin-top: 0.25rem;
256
  font-size: 1rem;
257
  line-height: 1.35;
258
  margin-bottom: 1rem;
259
}
260
261
.commit-info {
262
  color: var(--gray);
263
  font-size: 0.85rem;
264
}
265
266
.commit-date { float: right; }
267
268
.commit-email { font-family: var(--mono-font); }
269
.commit-email:before { content: '<'; }
270
.commit-email:after { content: '>'; }
271
272
.commit-refs { margin: 0.5rem 0 1rem 0; }
273
.commit-refs td.label { padding-right: 1rem; }
274
.commit-refs td {
275
  padding: 0.15rem 0.5rem 0.15rem 0;
276
  border: none;
277
}
278
279
/* diff */
280
.diff {
281
  margin: 1rem 0 1rem 0;
282
  padding: 0.6rem;
283
  border-bottom: 1.5px solid var(--medium-gray);
284
  background: var(--light-gray);
285
}
286
287
.diff pre {
288
  padding: 0;
289
  margin: 0;
290
}
291
292
.diff-line { display: flex; }
293
.diff-line:target { background: var(--sel-bg); }
294
.diff-line .line-number {
295
  flex-shrink: 0;
296
  border-right: 1px solid var(--light-gray);
297
  padding: 0 0.5rem;
298
  min-width: 3rem;
299
}
300
301
.diff-line .line-number a {
302
  display: inline;
303
  padding: 0;
304
}
305
306
.diff-line > span:last-child {
307
  flex-grow: 1;
308
  padding: 0 0.5rem;
309
}
310
311
.diff-op { margin-right: 0.5rem; }
312
.diff-stat { padding: 1rem 0 1rem 0; }
313
.diff-add { color: var(--diff-add); }
314
.diff-del { color: var(--diff-del); }
315
.diff-mod { color: var(--cyan); }
316
.diff-noop { color: var(--gray); }
317
.diff-separator {
318
  justify-content: center;
319
  background: var(--medium-gray);
320
}
321
322
.jump { margin-top: 0.5rem; }
323
.jump-table { margin-top: 0.25rem; }
324
.jump-table .diff-type { width: 2ch; }
325
.jump-table td {
326
  padding: 0.15rem 0.5rem;
327
  border-color: var(--medium-gray);
328
}
329
330
/* refs */
331
.ref {
332
  font-size: 1rem;
333
  color: var(--gray);
334
  display: inline-block;
335
  padding-top: 0.7em;
336
}
337
338
.refs strong { padding-right: 1em; }
339
.refs pre {
340
  padding-bottom: 0.5rem;
341
  white-space: pre-wrap;
342
}
343
344
.tag-message { margin-left: 0.5rem; }
345
.tag-message summary {
346
  cursor: pointer;
347
  color: var(--gray);
348
}
349
350
/* readme */
351
.readme {
352
  padding: 1.5rem 0;
353
  line-height: 1.6;
354
}
355
.readme > *:first-child { margin-top: 0; }
356
357
.readme h1, .readme h2, .readme h3, .readme h4, .readme h5, .readme h6 {
358
  margin-top: 1.5em;
359
  margin-bottom: 0.5em;
360
  line-height: 1.25;
361
}
362
.readme h1 { font-size: 2rem; }
363
.readme h2 { font-size: 1.5rem; }
364
.readme h3 { font-size: 1.25rem; }
365
.readme h4, .readme h5, .readme h6 { font-size: 1rem; }
366
367
.readme p, .readme ul, .readme ol, .readme pre { margin-bottom: 1em; }
368
.readme ul, .readme ol { padding-left: 2em; }
369
.readme li { margin-bottom: 0.25em; }
370
.readme a { border-bottom: 1.5px solid var(--medium-gray); }
371
.readme a > img { border-bottom: none; }
372
.readme img { max-width: 100%; }
373
.readme pre {
374
  background: var(--light-gray);
375
  padding: 0.6rem;
376
}
377
378
.readme pre.raw {
379
  background: unset;
380
  padding: unset;
381
}
382
383
.readme details > *:not(pre) { padding-left: 1em; }
384
.readme details > pre { margin-left: 1em; }
385
.readme details[data-callout] {
386
  border-left: 4px solid var(--gray);
387
  background: var(--light);
388
  padding: 0.5em 1em;
389
  margin: 1em 0;
390
}
391
.readme details[data-callout] .callout-content { padding-left: 0.5em; }
392
.readme details[data-callout] summary {
393
  font-weight: 600;
394
  cursor: pointer;
395
  margin-bottom: 0.5em;
396
}
397
398
.readme blockquote {
399
  border-left: 3px solid var(--gray);
400
  padding-left: 1em;
401
  color: var(--gray);
402
  margin: 1em 0;
403
}
404
405
@media (max-width: 600px) {
406
  pre { font-size: 0.8rem; }
407
408
  .repo-index { flex-direction: column; }
409
  .repo-index-main, .repo-index-side {
410
    flex: none;
411
    width: 100%;
412
  }
413
414
  .commit-info:not(:last-child) { padding-bottom: 1.5rem; }
415
}