Skip to content

Commit 8486663

Browse files
committed
api-style(feat[badges]): Apply dense and dotted-underline modifiers
why: Signature-row badges read more cleanly when dense; the dotted underline gives the label a quiet visual rhythm without implying a link. The shared Tier A modifiers (SAB.DENSE, SAB.UNDERLINE_DOTTED) already exist in sphinx-ux-badges and are already in production use by sphinx-autodoc-fastmcp (with NO_UNDERLINE). No CSS change required. what: - Append SAB.DENSE and SAB.UNDERLINE_DOTTED to both modifier and type BadgeSpec class tuples in build_badge_group(). - Existing 43 api-style tests continue to pass (their `in` assertions tolerate the added classes).
1 parent a9dce74 commit 8486663

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

  • packages/sphinx-autodoc-api-style/src/sphinx_autodoc_api_style

packages/sphinx-autodoc-api-style/src/sphinx_autodoc_api_style/_badges.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,13 @@ def build_badge_group(
143143
BadgeSpec(
144144
_MOD_LABELS[mod],
145145
tooltip=_MOD_TOOLTIPS[mod],
146-
classes=(SAB.BADGE, SAB.BADGE_MOD, _MOD_CSS[mod]),
146+
classes=(
147+
SAB.BADGE,
148+
SAB.BADGE_MOD,
149+
SAB.DENSE,
150+
SAB.UNDERLINE_DOTTED,
151+
_MOD_CSS[mod],
152+
),
147153
fill=fill,
148154
)
149155
)
@@ -155,7 +161,13 @@ def build_badge_group(
155161
BadgeSpec(
156162
label,
157163
tooltip=tooltip,
158-
classes=(SAB.BADGE, SAB.BADGE_TYPE, SAB.obj_type(objtype)),
164+
classes=(
165+
SAB.BADGE,
166+
SAB.BADGE_TYPE,
167+
SAB.DENSE,
168+
SAB.UNDERLINE_DOTTED,
169+
SAB.obj_type(objtype),
170+
),
159171
)
160172
)
161173

0 commit comments

Comments
 (0)