You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
css(refactor[namespace]): rename sab-/smf-/spf-/api- to gp-sphinx-* across workspace
why: The four opaque three-letter CSS prefixes (sab-, smf-, spf-, api-)
gave no hint that classes came from gp-sphinx, which package owned
them, or what tier they belonged to. The new scheme uses a
self-documenting two-tier BEM namespace rooted at `gp-sphinx-`:
- Tier A (shared concepts): gp-sphinx-badge, gp-sphinx-badge-group,
gp-sphinx-toolbar, gp-sphinx-api-* (the layout primitives every
extension reuses).
- Tier B (package-owned): gp-sphinx-fastmcp__*,
gp-sphinx-pytest-fixtures__*.
Modifiers use axis-value pairs (--size-xs, --type-function,
--safety-readonly). CSS authors chain selectors
(.gp-sphinx-badge.gp-sphinx-badge--dense) to preserve the existing
0,3,0 specificity. CSS custom properties we own
(--sab-*, --smf-*, --badge-safety-*, --api-signature-indent) are
renamed to match (--gp-sphinx-badge-*, --gp-sphinx-fastmcp-*,
--gp-sphinx-fastmcp-safety-*, --gp-sphinx-api-signature-indent).
Furo-owned variables (--color-api-*, --font-stack--monospace, etc.)
stay untouched.
Because all 12 packages publish together and there are no external
consumers to deprecate against, this ships as a single atomic
rename — no dual-emit, no ClassPair, no legacy selectors, no version
bumps, no migration guide.
what:
- Rewrite SAB (56 attrs) and _CSS (11 attrs) constant containers with
new string values; keep class names for call-site stability. The
PREFIX attribute now holds the new root (gp-sphinx-badge /
gp-sphinx-fastmcp).
- Create new _css.py containers: SPF in sphinx-autodoc-pytest-fixtures
and API in sphinx-ux-autodoc-layout. Migrate every bare literal in
_index.py, _cards.py, _nodes.py, _transforms.py, _visitors.py,
_sections.py to the new constants. Re-export API via
sphinx_ux_autodoc_layout.__init__.
- Rewrite all 6 CSS files (sphinx_ux_badges.css, sab_palettes.css,
api_style.css, layout.css, sphinx_autodoc_pytest_fixtures.css,
sphinx_autodoc_fastmcp.css). Preserve every chained-selector
composition so specificity parity stays at 0,3,0.
- Rename --sab-*, --smf-*, --badge-safety-*, --api-signature-indent
CSS custom properties to --gp-sphinx-badge-*, --gp-sphinx-fastmcp-*,
--gp-sphinx-fastmcp-safety-*, --gp-sphinx-api-signature-indent.
- Rewrite the 8 .api-* DOM selectors in
sphinx_ux_autodoc_layout/_static/js/layout.js.
- Rename the two MyST directives that participate in the docs build:
sab-badge-demo → gp-sphinx-badge-demo (in sab_demo.py + gallery.md)
sab-package-meta → gp-sphinx-package-meta (in sab_meta.py + every
docs/packages/*.md header).
- Update every test assertion (`assert "sab-badge" in classes`, etc.)
to the new names across tests/ext/{layout,fastmcp,pytest_fixtures,
badges,api_style,autodoc_docutils,autodoc_sphinx}/.
Regenerate all 11 snapshots in tests/**/__snapshots__/*.ambr via
`uv run pytest --snapshot-update`.
- Update 12 docs/packages/*.md files + gallery.md + sphinx-ux-badges
README for the new class/directive names.
- Verified: ruff + mypy clean, py.test 944 passed / 3 skipped,
`just build-docs` succeeds, rendered HTML confirms new classes
(e.g. `class="gp-sphinx-badge gp-sphinx-badge--dense
gp-sphinx-fastmcp__safety-readonly …"`).
0 commit comments