File: argparse-highlight.css

package info (click to toggle)
tmuxp 1.64.0-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 3,500 kB
  • sloc: python: 17,788; sh: 21; makefile: 6
file content (274 lines) | stat: -rw-r--r-- 6,190 bytes parent folder | download | duplicates (2)
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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
/*
 * Argparse/CLI Highlighting Styles
 *
 * Styles for CLI inline roles and argparse help output highlighting.
 * Uses "One Dark" inspired color palette (Python 3.14 argparse style).
 *
 * Color Palette:
 *   Background:    #282C34
 *   Default text:  #CCCED4
 *   Usage label:   #61AFEF (blue, bold)
 *   Program name:  #C678DD (purple, bold)
 *   Subcommands:   #98C379 (green)
 *   Options:       #56B6C2 (teal)
 *   Metavars:      #E5C07B (yellow, italic)
 *   Choices:       #98C379 (green)
 *   Headings:      #E5E5E5 (bright, bold)
 *   Punctuation:   #CCCED4
 */

/* ==========================================================================
   Inline Role Styles
   ========================================================================== */

/*
 * CLI Options
 *
 * Long options (--verbose) and short options (-h) both use teal color.
 */
.cli-option {
    font-family: var(--font-stack--monospace);
}

.cli-option-long {
    color: #56B6C2;
}

.cli-option-short {
    color: #56B6C2;
}

/*
 * CLI Metavars
 *
 * Placeholder values like FILE, PATH, DIRECTORY.
 * Yellow/amber to indicate "replace me" - distinct from flags (teal).
 */
.cli-metavar {
    font-family: var(--font-stack--monospace);
    color: #E5C07B;
    font-style: italic;
}

/*
 * CLI Commands
 *
 * Subcommand names like sync, add, list.
 * Green (same as choices) - they're enumerated command options.
 */
.cli-command {
    font-family: var(--font-stack--monospace);
    color: #98C379;
    font-weight: bold;
}

/*
 * CLI Default Values
 *
 * Default values shown in help text like None, "auto".
 * Subtle styling to not distract from options.
 */
.cli-default {
    font-family: var(--font-stack--monospace);
    color: #CCCED4;
    font-style: italic;
}

/*
 * CLI Choice Values
 *
 * Choice enumeration values like json, yaml, table.
 * Green color to show they are valid literal values.
 */
.cli-choice {
    font-family: var(--font-stack--monospace);
    color: #98C379;
}

/* ==========================================================================
   Argparse Code Block Highlighting
   ========================================================================== */

/*
 * These styles apply within Pygments-highlighted code blocks using the
 * argparse, argparse-usage, or argparse-help lexers.
 */

/* Usage heading "usage:" - bold blue */
.highlight-argparse .gh,
.highlight-argparse-usage .gh,
.highlight-argparse-help .gh {
    color: #61AFEF;
    font-weight: bold;
}

/* Section headers like "positional arguments:", "options:" - neutral bright */
.highlight-argparse .gs,
.highlight-argparse-help .gs {
    color: #E5E5E5;
    font-weight: bold;
}

/* Long options --foo - teal */
.highlight-argparse .nt,
.highlight-argparse-usage .nt,
.highlight-argparse-help .nt {
    color: #56B6C2;
    font-weight: normal;
}

/* Short options -h - teal (same as long) */
.highlight-argparse .na,
.highlight-argparse-usage .na,
.highlight-argparse-help .na {
    color: #56B6C2;
    font-weight: normal;
}

/* Metavar placeholders FILE, PATH - yellow/amber italic */
.highlight-argparse .nv,
.highlight-argparse-usage .nv,
.highlight-argparse-help .nv {
    color: #E5C07B;
    font-style: italic;
}

/* Command/program names - purple bold */
.highlight-argparse .nl,
.highlight-argparse-usage .nl,
.highlight-argparse-help .nl {
    color: #C678DD;
    font-weight: bold;
}

/* Subcommands - bold green */
.highlight-argparse .nf,
.highlight-argparse-usage .nf,
.highlight-argparse-help .nf {
    color: #98C379;
    font-weight: bold;
}

/* Choice values - green */
.highlight-argparse .no,
.highlight-argparse-usage .no,
.highlight-argparse-help .no,
.highlight-argparse .nc,
.highlight-argparse-usage .nc,
.highlight-argparse-help .nc {
    color: #98C379;
}

/* Punctuation [], {}, () - neutral gray */
.highlight-argparse .p,
.highlight-argparse-usage .p,
.highlight-argparse-help .p {
    color: #CCCED4;
}

/* Operators like | - neutral gray */
.highlight-argparse .o,
.highlight-argparse-usage .o,
.highlight-argparse-help .o {
    color: #CCCED4;
    font-weight: normal;
}

/* ==========================================================================
   Argparse Directive Highlighting (.. argparse:: output)
   ========================================================================== */

/*
 * These styles apply to the argparse directive output which uses custom
 * nodes rendered by sphinx_argparse_neo. The directive adds highlight spans
 * directly to the HTML output.
 */

/*
 * Usage Block (.argparse-usage)
 *
 * The usage block now has both .argparse-usage and .highlight-argparse-usage
 * classes. The .highlight-argparse-usage selectors above already handle the
 * token highlighting. These selectors provide fallback and ensure consistent
 * styling.
 */

/* Usage block container - match Pygments monokai background and code block styling */
pre.argparse-usage {
    background: #272822;  /* Monokai - same as .highlight */
    padding: .625rem .875rem;
    line-height: 1.5;
    border-radius: .2rem;
    scrollbar-color: var(--color-foreground-border) transparent;
    scrollbar-width: thin;
}

.argparse-usage .gh {
    color: #61AFEF;
    font-weight: bold;
}

.argparse-usage .nt {
    color: #56B6C2;
    font-weight: normal;
}

.argparse-usage .na {
    color: #56B6C2;
    font-weight: normal;
}

.argparse-usage .nv {
    color: #E5C07B;
    font-style: italic;
}

.argparse-usage .nl {
    color: #C678DD;
    font-weight: bold;
}

.argparse-usage .nf {
    color: #98C379;
    font-weight: bold;
}

.argparse-usage .no,
.argparse-usage .nc {
    color: #98C379;
}

.argparse-usage .o {
    color: #CCCED4;
    font-weight: normal;
}

.argparse-usage .p {
    color: #CCCED4;
}

/*
 * Argument Name (<dt class="argparse-argument-name">)
 *
 * The argument names in the dl/dt structure are highlighted with
 * semantic spans for options and metavars.
 */
.argparse-argument-name .nt {
    color: #56B6C2;
    font-weight: normal;
}

.argparse-argument-name .na {
    color: #56B6C2;
    font-weight: normal;
}

.argparse-argument-name .nv {
    color: #E5C07B;
    font-style: italic;
}

.argparse-argument-name .nl {
    color: #C678DD;
    font-weight: bold;
}