Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ $ uv add gp-sphinx --prerelease allow

<!-- To maintainers and contributors: Please add notes for the forthcoming version below -->

### Fixes

#### Type chips in parameter lists regain their padding

Standalone type annotations in autodoc parameter and return lists — a
plain `str`, a `pathlib.Path`, the members of a union — rendered cramped
against the edge of their chip background. They now get their horizontal
breathing room back, while compound expressions such as `list[str]` and
`dict[str, Any]` still render flush at their brackets. (#54)

## gp-sphinx 0.0.1a29 (2026-06-07)

### What's new
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,25 @@
* blocks the compounding while still scaling with the root clamp
* ramp on wide viewports.
*
* `padding-inline: 0` cancels Furo's `padding: 0.1em 0.2em`
* horizontal component so the chip background sits flush against
* the bracket characters around it. Without this, generic types
* read with visible whitespace inside the brackets — `list[ str ]`
* instead of `list[str]` — because the brackets and commas live
* outside the chip and have no padding of their own. Vertical
* `0.1em` padding stays so the chip retains visible block height. */
* Keep Furo's `0.2em` horizontal padding so a standalone type chip
* (`str`, `pathlib.Path`) reads as a chip with breathing room rather
* than text crammed against its background edge. The two overrides
* below cancel that padding only where a chip abuts `.p` punctuation
* (brackets, inner commas, pipes), so compound expressions still
* render flush — `list[str]`, not `list[ str ]` — because the
* brackets live outside the chip and have no padding of their own.
* Linked chips wrap the `<code>` in `<a>`, so the punctuation is the
* anchor's sibling; match both the bare and anchored forms. */
.field-list code.literal {
font-size: 0.8125rem;
padding-inline: 0;
padding-inline: 0.2em;
}
.field-list code.literal:has(+ .p),
.field-list a.reference:has(+ .p) > code.literal {
padding-inline-end: 0;
}
.field-list .p + code.literal,
.field-list .p + a.reference > code.literal {
padding-inline-start: 0;
}
}