Skip to content

Commit c0c7bf7

Browse files
committed
docs(css): border card-title code chips to match Furo prose chips
Furo applies its 1px chip border only to <code> inside a <p> (via the SCSS `p & { border: ... }` rule). sphinx-design card titles are bare <div class="sd-card-title">, so tool-name code chips in the tools / prompts / resources grids were rendering as plain highlighted spans — visually inconsistent with every other inline code chip on the site. Add project-cards.css with one scoped rule extending the same `var(--color-background-border)` border to code.literal and .sig-inline inside .sd-card-title. Three pages affected (tools/*/ scope indices, prompts, resources), zero markup changes, zero extension changes.
1 parent d62b5df commit c0c7bf7

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

docs/_static/css/project-cards.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/* docs/_static/css/project-cards.css
2+
*
3+
* Scope: sphinx-design grid-item-card titles.
4+
*
5+
* Furo applies a 1px border to <code> chips only when they sit inside a
6+
* paragraph (SCSS rule: `code.literal, .sig-inline { p & { border: 1px
7+
* solid var(--color-background-border) } }`). Card titles are <div>s,
8+
* not <p>s, so the border never lands -- the chip reads as a plain
9+
* highlighted span instead of a proper code badge. Extend the same
10+
* border to code chips in card titles so they match prose.
11+
*/
12+
13+
.sd-card-title code.literal,
14+
.sd-card-title .sig-inline {
15+
border: 1px solid var(--color-background-border);
16+
}

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ def setup(app: Sphinx) -> None:
146146
app.connect("autodoc-process-docstring", _convert_md_xrefs)
147147
app.add_js_file("js/prompt-copy.js", loading_method="defer")
148148
app.add_css_file("css/project-admonitions.css")
149+
app.add_css_file("css/project-cards.css")
149150

150151

151152
globals().update(conf)

0 commit comments

Comments
 (0)