-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshelldocs-theme.css
More file actions
195 lines (178 loc) · 7.38 KB
/
Copy pathshelldocs-theme.css
File metadata and controls
195 lines (178 loc) · 7.38 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
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
/* ShellDocs Component Styles
─────────────────────────────────────────────────────────────────────
Base HTML resets, .shelldocs-prose typography, code-block chrome, and
Prism.js overrides. All colours/spacings resolve via the CSS variables
defined in ShellDocs.Tokens (loaded separately as `tokens.css`).
───────────────────────────────────────────────────────────────────── */
/* Base */
*, *::before, *::after { box-sizing: border-box; border-color: var(--border); }
html {
background: var(--background);
color: var(--foreground);
font-family: var(--font-sans);
font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11', 'ss01';
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
scroll-behavior: smooth;
scrollbar-gutter: stable; /* fumadocs — no jumpy shift when a modal opens */
}
body { margin: 0; min-height: 100vh; }
::selection { background: color-mix(in oklch, var(--primary) 20%, transparent); color: var(--foreground); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; border: 2px solid var(--background); }
::-webkit-scrollbar-thumb:hover { background: var(--muted-foreground); }
/* Prose */
.shelldocs-prose { color: var(--foreground); font-size: 0.95rem; line-height: 1.7; }
.shelldocs-prose > *:first-child { margin-top: 0; }
.shelldocs-prose > *:last-child { margin-bottom: 0; }
.shelldocs-prose h1 { font-size: 2.125rem; font-weight: 700; letter-spacing: -0.025em; margin: 0 0 0.75rem; line-height: 1.2; color: var(--foreground); }
.shelldocs-prose h2 { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; margin: 2.5rem 0 0.75rem; line-height: 1.3; scroll-margin-top: calc(var(--header-height) + 2rem); }
.shelldocs-prose h3 { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.015em; margin: 1.75rem 0 0.5rem; line-height: 1.4; scroll-margin-top: calc(var(--header-height) + 2rem); }
.shelldocs-prose h4 { font-size: 1rem; font-weight: 600; margin: 1.25rem 0 0.5rem; }
.shelldocs-prose p { margin: 1rem 0; color: var(--foreground); }
.shelldocs-prose a {
color: var(--foreground);
text-decoration: underline;
text-underline-offset: 3px;
text-decoration-thickness: 1px;
text-decoration-color: color-mix(in oklch, var(--foreground) 30%, transparent);
transition: text-decoration-color 150ms;
font-weight: 500;
}
.shelldocs-prose a:hover { text-decoration-color: var(--foreground); }
.shelldocs-prose strong { font-weight: 600; color: var(--foreground); }
.shelldocs-prose code {
font-family: var(--font-mono);
font-size: 0.85em;
background: var(--muted);
padding: 0.15rem 0.4rem;
border-radius: 4px;
color: var(--foreground);
border: 1px solid var(--border);
font-feature-settings: 'ss01';
}
.shelldocs-prose ul, .shelldocs-prose ol { padding-left: 1.5rem; margin: 1rem 0; }
.shelldocs-prose li { margin: 0.35rem 0; }
.shelldocs-prose li::marker { color: var(--muted-foreground); }
.shelldocs-prose blockquote {
border-left: 3px solid var(--border-strong);
padding: 0.75rem 0 0.75rem 1rem;
margin: 1.25rem 0;
color: var(--muted-foreground);
background: color-mix(in oklch, var(--muted) 60%, transparent);
border-radius: 0 var(--radius) var(--radius) 0;
}
.shelldocs-prose blockquote p { margin: 0; }
.shelldocs-prose table {
border-collapse: collapse;
width: 100%;
margin: 1.25rem 0;
font-size: 0.875rem;
border: 1px solid var(--border);
border-radius: var(--radius);
overflow: hidden;
}
.shelldocs-prose th, .shelldocs-prose td { padding: 0.625rem 0.875rem; text-align: left; border-bottom: 1px solid var(--border); }
.shelldocs-prose th { font-weight: 600; color: var(--foreground); background: var(--muted); font-size: 0.8125rem; }
.shelldocs-prose tr:last-child td { border-bottom: 0; }
.shelldocs-prose tr:hover { background: color-mix(in oklch, var(--muted) 40%, transparent); }
.shelldocs-prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
.shelldocs-prose img { border-radius: var(--radius); border: 1px solid var(--border); max-width: 100%; height: auto; }
/* Code blocks — wrapped by CodeBlockEnhancer */
.shelldocs-codeblock {
position: relative;
border: 1px solid var(--border);
border-radius: var(--radius);
background: var(--card);
overflow: hidden;
margin: 1.5rem 0;
}
.shelldocs-codeblock-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.375rem 0.5rem 0.375rem 0.875rem;
border-bottom: 1px solid var(--border);
background: color-mix(in oklch, var(--card) 60%, var(--background));
}
.shelldocs-code-lang {
font-size: 0.7rem;
font-weight: 500;
color: var(--muted-foreground);
text-transform: lowercase;
letter-spacing: 0.02em;
font-family: var(--font-mono);
}
.shelldocs-codeblock-copy {
display: inline-flex;
align-items: center;
justify-content: center;
width: 1.75rem;
height: 1.75rem;
background: transparent;
border: 1px solid transparent;
border-radius: 5px;
color: var(--muted-foreground);
cursor: pointer;
transition: color 150ms, background 150ms, border-color 150ms;
padding: 0;
margin-left: auto;
}
.shelldocs-codeblock-copy:hover {
color: var(--foreground);
background: var(--muted);
border-color: var(--border);
}
.shelldocs-codeblock-copy svg { width: 0.875rem; height: 0.875rem; }
.shelldocs-codeblock-copy .icon-check { display: none; color: var(--success); }
.shelldocs-codeblock-copy.copied .icon-copy { display: none; }
.shelldocs-codeblock-copy.copied .icon-check { display: block; }
.shelldocs-codeblock pre {
margin: 0;
padding: 1rem 1.125rem;
background: transparent;
border: 0;
border-radius: 0;
font-size: 0.85rem;
line-height: 1.7;
overflow-x: auto;
}
.shelldocs-codeblock pre code {
background: transparent;
padding: 0;
border: 0;
font-family: var(--font-mono);
font-size: inherit;
color: var(--foreground);
font-feature-settings: 'ss01', 'cv02';
}
/* Shiki output — normalise its inline styles into our chrome. */
.shelldocs-codeblock pre.shiki,
.shelldocs-prose pre.shiki,
.preview-body pre.shiki {
margin: 0 !important;
padding: 1rem 1.125rem !important;
border: 0 !important;
border-radius: 0 !important;
font-family: var(--font-mono) !important;
font-size: 0.85rem !important;
line-height: 1.7 !important;
overflow-x: auto;
}
pre.shiki code {
background: transparent !important;
padding: 0 !important;
border: 0 !important;
font-family: var(--font-mono) !important;
font-size: inherit !important;
}
/* Dual-theme: Shiki emits --shiki-light + --shiki-dark on each token span
with defaultColor:false. Only set `color` — NEVER background on spans, or
every .line wrapper paints a bg strip across the block. */
pre.shiki { background-color: transparent !important; }
pre.shiki,
pre.shiki span { color: var(--shiki-light); }
:root.dark pre.shiki,
:root.dark pre.shiki span { color: var(--shiki-dark); }