Skip to content

Commit 3f84cd1

Browse files
committed
style(css): Use var(--code-font-size) for all argparse elements
Standardize font-size across CLI inline roles, usage blocks, argument names, and metadata to use Furo's --code-font-size variable (81.25%) for consistent sizing with other code elements.
1 parent 24f7fb4 commit 3f84cd1

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

docs/_static/css/argparse-highlight.css

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,15 @@
2222
========================================================================== */
2323

2424
/*
25-
* Shared monospace font for all CLI inline roles
25+
* Shared monospace font and code font-size for all CLI inline roles
2626
*/
2727
.cli-option,
2828
.cli-metavar,
2929
.cli-command,
3030
.cli-default,
3131
.cli-choice {
3232
font-family: var(--font-stack--monospace);
33+
font-size: var(--code-font-size);
3334
}
3435

3536
/*
@@ -191,6 +192,7 @@
191192
/* Usage block container - match Pygments monokai background and code block styling */
192193
pre.argparse-usage {
193194
background: var(--argparse-code-background);
195+
font-size: var(--code-font-size);
194196
padding: 0.625rem 0.875rem;
195197
line-height: 1.5;
196198
border-radius: 0.2rem;
@@ -289,6 +291,7 @@ pre.argparse-usage {
289291
border-radius: 0.2rem;
290292
padding: 0.485rem 0.875rem;
291293
font-family: var(--font-stack--monospace);
294+
font-size: var(--code-font-size);
292295
width: fit-content;
293296
position: relative;
294297
}
@@ -370,7 +373,7 @@ body:not([data-theme="dark"]) .argparse-argument-name .headerlink {
370373

371374
.argparse-meta-key {
372375
color: var(--color-foreground-secondary, #6c757d);
373-
font-size: var(--font-size--small);
376+
font-size: var(--code-font-size);
374377
}
375378

376379
.argparse-meta-key::after {
@@ -382,7 +385,7 @@ body:not([data-theme="dark"]) .argparse-argument-name .headerlink {
382385
border-radius: 0.2rem;
383386
padding: 0.1rem 0.3rem;
384387
font-family: var(--font-stack--monospace);
385-
font-size: var(--font-size--small);
388+
font-size: var(--code-font-size);
386389
color: #e5c07b;
387390
}
388391

@@ -395,7 +398,7 @@ body:not([data-theme="dark"]) .argparse-argument-name .headerlink {
395398
background-color: #fef3c780;
396399
border: 1px solid #fcd34d80;
397400
color: var(--color-foreground-primary);
398-
font-size: var(--font-size--small);
401+
font-size: var(--code-font-size);
399402
padding: 0.1rem 0.4rem;
400403
border-radius: 0.2rem;
401404
font-weight: 500;

0 commit comments

Comments
 (0)