-
Notifications
You must be signed in to change notification settings - Fork 216
/
overrides.css
147 lines (115 loc) · 2.93 KB
/
overrides.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
/* This file exists to provide CSS overrides to styles that exist on the pages
that are generated by deno_doc, the tool that powers the API reference documentation */
#content > main > section + div {
@apply max-w-[75ch] !important;
}
.ddoc .markdown-summary {
@apply text-foreground-secondary !important;
}
.ddoc .namespaceSection {
display: block !important;
}
.ddoc .namespaceSection .namespaceItem {
@apply min-h-0 mb-3 !important;
}
.ddoc .namespaceSection .namespaceItem .namespaceItemContent > div {
@apply text-foreground-secondary !important;
}
@media (max-width: 768px) {
.ddoc {
@apply px-0 !important;
}
.ddoc > div:not(.categoryPanel) {
@apply px-4 !important;
}
.ddoc .markdown-body .highlight {
@apply -mx-4 !important;
}
.ddoc .markdown-body pre > code:first-child {
@apply px-4 !important;
}
}
/* Align content with the top of the TOC now that it has no header */
#content {
@apply mt-2 !important;
}
#topnav {
@apply md:mt-1 !important;
}
.ddoc {
@apply gap-8 !important;
}
/* Adjust spacing to account for removed header */
.ddoc .toc .documentNavigation {
@apply md:mt-4 !important;
}
.ddoc .toc .documentNavigation > ul li {
@apply ml-1 !important;
}
.ddoc .z-50 {
z-index: 49 !important;
}
.ddoc .usageContent {
@apply bg-primary/5 border-primary/25 max-w-[75ch] py-4 mt-6 relative
!important;
> div {
color: inherit !important;
}
}
/* Adjust spacing for ref pages that don't have a header above usage */
.ddoc .usageContent:first-of-type {
@apply mt-1 !important;
}
.ddoc .usageContent > div.markdown-body > pre.highlight {
@apply border-primary/25 !important;
}
.ddoc .usageContent > h3 {
@apply text-xs -top-2.5 bg-background-primary border border-primary/25 px-2
py-0.5 rounded absolute !important;
}
.dark .ddoc .usageContent pre {
background: inherit;
color: inherit;
}
.ddoc .usageContent > .markdown-body {
@apply max-w-full !important;
}
.ddoc .context_button:hover {
@apply bg-gray-000/25 !important;
}
/* This section attempts to style the headings on the category index pages differently from the symbol detail pages */
.ddoc .space-y-7 > .section {
@apply mt-4 !important;
}
.ddoc .space-y-7 > .section:first-child {
@apply mt-0 !important;
}
.ddoc .space-y-7 > .section .markdown-body {
@apply mb-6 !important;
}
.totop {
@apply block fixed p-3 bg-background-secondary rounded-md border
border-background-tertiary bottom-4 right-4 text-transparent;
animation-name: showToTop;
animation-duration: 1ms;
animation-timeline: --showScrollTop;
}
.totop::after {
@apply block w-4 h-4 border-2 border-primary border-l-0 border-t-0;
content: "";
transform: translate(0, 25%) rotate(225deg);
}
html {
scroll-timeline: --showScrollTop y;
scroll-timeline: --showScrollTop vertical;
}
@keyframes showToTop {
0% {
opacity: 0;
transform: translateY(300%);
}
10% {
opacity: 1;
transform: translateY(0%);
}
}