-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy pathcustom.css
More file actions
64 lines (55 loc) · 2.2 KB
/
Copy pathcustom.css
File metadata and controls
64 lines (55 loc) · 2.2 KB
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
pre { font-size: 100% !important }
code { font-size: 90% !important }
h1, h2, h3, h4, h5 { margin: 1rem 0; width: 100%; }
ul li { margin-left: 1rem }
.top-100px { top: 100px }
/* No preference or prefers light */
:root:not([data-prefers-color-scheme=dark]),
html[data-prefers-color-scheme=light] {
--color-bg-canvas: rgb(255, 255, 255);
--color-bg-canvas-shadow: rgba(255, 255, 255, 0);
--color-bg-canvas-tertiary: #f6f8fa;
--color-text-primary: #24292e;
--color-markdown-code-bg: rgba(27, 31, 35, 0.05);
}
/* Prefers dark */
html[data-prefers-color-scheme=dark] {
--color-bg-canvas: rgb(13, 17, 23);
--color-bg-canvas-shadow: rgba(13, 17, 23, 0);
--color-bg-canvas-tertiary: #161b22;
--color-text-primary: #c9d1d9;
--color-markdown-code-bg: rgba(240, 246, 252, 0.05);
}
@media (prefers-color-scheme: dark) {
:root:not([data-prefers-color-scheme=light]) {
--color-bg-canvas: rgb(13, 17, 23);
--color-bg-canvas-shadow: rgba(13, 17, 23, 0);
--color-bg-canvas-tertiary: #161b22;
--color-text-primary: #c9d1d9;
--color-markdown-code-bg: rgba(240, 246, 252, 0.05);
}
}
body {
background-color: var(--color-bg-canvas);
color: var(--color-text-primary);
}
/* Sidebar */
/* NB: `!important` is already used; so it’s required here */
.bg-gray { background-color: var(--color-bg-canvas-tertiary) !important }
/* Code Blocks & Syntax */
.markdown-body .highlight pre, .markdown-body pre {
background-color: var(--color-bg-canvas-tertiary);
overflow: auto;
}
/* Inline Code */
.markdown-body code, .markdown-body tt { background-color: var(--color-markdown-code-bg) }
/* Tables */
.markdown-body table tr:nth-of-type(odd) th, .markdown-body table tr:nth-of-type(odd) td { background-color: var(--color-bg-canvas) }
.markdown-body table tr:nth-of-type(even) th, .markdown-body table tr:nth-of-type(even) td { background-color: var(--color-bg-canvas-tertiary) }
/* Override Primer .tooltipped default aria-label */
.code-tooltip:after { content: attr(data-title); text-align: left; font-size: 100%; }
/* :after text will be announced by AT, this adds a separation between textContent and :after text */
.code-tooltip:before { content: ': '; font-size: 0; }
.code-tooltip {
scroll-margin-top: 150px;
}