-
Notifications
You must be signed in to change notification settings - Fork 694
Expand file tree
/
Copy pathconfig_generator.css
More file actions
216 lines (182 loc) · 4.68 KB
/
config_generator.css
File metadata and controls
216 lines (182 loc) · 4.68 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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
/* ================================================================
LMDeploy Interactive Configuration Generator – pill-bar layout
Matches the SGLang Cookbook segmented-control style
================================================================ */
/* Wrapper: full content width, no card background */
.cg-wrapper {
width: 100%;
margin: 0;
padding: 0;
}
/* ── Dimension row ─────────────────────────────────────────────── */
.cg-row {
margin-bottom: 1.25em;
}
.cg-label {
font-weight: 600;
font-size: 0.95em;
margin-bottom: 0.4em;
color: var(--pst-color-text-base, #24292e);
}
/* ── Pill bar (segmented control) ──────────────────────────────── */
.cg-pill-bar {
display: flex;
flex-wrap: wrap;
width: 100%;
border: 1px solid var(--pst-color-border, #d1d5db);
border-radius: 6px;
overflow: hidden;
background: var(--pst-color-surface, #ffffff);
}
.cg-pill {
flex: 1 1 0;
min-width: 0;
padding: 0.55em 0.4em;
margin: 0;
border: none;
border-right: 1px solid var(--pst-color-border, #d1d5db);
background: transparent;
color: var(--pst-color-text-base, #24292e);
font-size: 0.88em;
font-weight: 500;
cursor: pointer;
text-align: center;
transition: background 0.15s ease, color 0.15s ease;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
line-height: 1.4;
}
.cg-pill:last-child {
border-right: none;
}
.cg-pill:hover {
background: rgba(3, 102, 214, 0.08);
}
.cg-pill.active {
background: #0366d6;
color: #ffffff;
font-weight: 600;
}
.cg-pill.active:hover {
background: #0256c2;
}
/* ── Command output section ────────────────────────────────────── */
.cg-command-section {
margin-top: 1.5em;
}
.cg-command-label {
font-weight: 600;
font-size: 0.95em;
margin-bottom: 0.4em;
color: var(--pst-color-text-base, #24292e);
}
.cg-command-box {
background: #1e1e1e;
border-radius: 6px;
padding: 1em 1em 1em 1.2em;
position: relative;
width: 100%;
box-sizing: border-box;
}
.cg-command-box pre {
margin: 0;
padding: 0;
padding-right: 4.5em; /* space for the copy button */
background: transparent;
overflow-x: auto;
}
.cg-command-box code {
color: #d4d4d4;
font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', monospace;
font-size: 0.88em;
line-height: 1.6;
white-space: pre;
}
.cg-copy-btn {
position: absolute;
top: 0.6em;
right: 0.6em;
background: #0366d6;
color: #ffffff;
border: none;
border-radius: 4px;
padding: 0.35em 0.9em;
cursor: pointer;
font-size: 0.8em;
font-weight: 500;
transition: background 0.2s ease;
}
.cg-copy-btn:hover {
background: #0256c2;
}
.cg-copy-btn:active {
background: #014a9e;
}
/* ── Responsive: stack pills on narrow screens ─────────────────── */
@media (max-width: 640px) {
.cg-pill-bar {
flex-direction: column;
}
.cg-pill {
border-right: none;
border-bottom: 1px solid var(--pst-color-border, #d1d5db);
}
.cg-pill:last-child {
border-bottom: none;
}
}
/* ── Dark-mode overrides (sphinx-book-theme data-theme) ────────── */
html[data-theme="dark"] .cg-label,
html[data-theme="dark"] .cg-command-label {
color: #f0f6fc;
}
html[data-theme="dark"] .cg-pill-bar {
border-color: #30363d;
background: #161b22;
}
html[data-theme="dark"] .cg-pill {
color: #c9d1d9;
border-color: #30363d;
}
html[data-theme="dark"] .cg-pill:hover {
background: rgba(88, 166, 255, 0.12);
}
html[data-theme="dark"] .cg-pill.active {
background: #1f6feb;
color: #ffffff;
}
html[data-theme="dark"] .cg-command-box {
background: #0d1117;
}
html[data-theme="dark"] .cg-command-box code {
color: #c9d1d9;
}
/* Also handle prefers-color-scheme for themes without data-theme */
@media (prefers-color-scheme: dark) {
.cg-label,
.cg-command-label {
color: #f0f6fc;
}
.cg-pill-bar {
border-color: #30363d;
background: #161b22;
}
.cg-pill {
color: #c9d1d9;
border-color: #30363d;
}
.cg-pill:hover {
background: rgba(88, 166, 255, 0.12);
}
.cg-pill.active {
background: #1f6feb;
color: #ffffff;
}
.cg-command-box {
background: #0d1117;
}
.cg-command-box code {
color: #c9d1d9;
}
}