Change Log#
Unreleased#
β»οΈ IMPROVE: Replace the Sass/Node build with a dependency-free Python CSS generator (
tools/generate_css.pydriven bystyle/design.tomland hand-authoredstyle/*.css);package.jsonis gone. The compiledsphinx-design.min.cssis a rule-set no-op apart from two deliberate changes. Hover/focus shades now use runtimecolor-mix()(behind a static fallback), so overriding a--sd-color-*variable now flows through to its-highlightshade instead of the shade being frozen at build time. Also purges ~150 dead vendor prefixes (IE-ms-flex*, and-moz-/-webkit-animation, box-sizing and user-select duplicates) that no supported browser needs. The migration was verified rule-for-rule and cascade-order-faithful against the previous stylesheet, and the new build fails loudly on unregistered style files, malformed token data, or a stale/unparsable artifact β see the new βDesign: the CSS pipelineβ documentation page (PR #290)π DOCS: Document the browser support policy as Baseline Widely Available (evergreen Chrome/Edge/Firefox/Safari, no Internet Explorer), replacing the stale 2021 Bootstrap browserslist mirror (PR #290)
π§ MAINTAIN: CI now compiles the documentationβs LaTeX output to PDF (exercising the
sd_fontawesome_latex="fontawesome5"icon path, which the docs now use), and the fa-build hint recommends"fontawesome5"over the legacy FontAwesome 4 package (PR #289)β¨ NEW:
sd_fontawesome_versionmakes icon role names version-agnostic: any spelling (fas,fa-solid, β¦) can emit the FontAwesome"4","5"or"6"class scheme, so upgrading FontAwesome is a one-lineconf.pychange; the default"as-named"keeps emitting the role name verbatim (PR #288, #174)β¨ NEW: Badge roles accept a trailing
; tooltipsuffix, rendered as a native HTMLtitletooltip on allbdg-*families; for the link/ref badges the suffix applies only after the explicittext <target>form (semicolons are valid in URLs and reference targets), and a literal;in badge text is escaped as\;(PR #286, #81)β¨ NEW: FontAwesome v6 roles (
fa-solid/fa-brands/fa-regular) and declarative CSS loading via the newsd_fontawesome_source/sd_fontawesome_cdn_urloptions (the supported path for FontAwesome Pro kits) (PR #285, #174)π IMPROVE:
sd_fontawesome_latexnow also accepts"fontawesome5"(addingfontawesome5.styand emitting\faIcon{...}), resolving package clashes with themes that loadfontawesome5;True/Falsekeep working unchanged (PR #285, #242)π FIX: Synced tabs stay in sync when activated by click-and-drag or keyboard, by syncing on the radio inputβs
changeevent rather than a label click (PR #284, #46)β¨ NEW: A URL fragment that targets a tab (e.g.
page.html#tab-name), or an element inside a tab panel, now opens that tab (both on load and onhashchange) (PR #284, #239)π IMPROVE: Tab selections now persist across browsing sessions, via
localStorageinstead ofsessionStorage(a behaviour change), and the storage key prefix is configurable with the newsd_tabs_storage_prefixoption (set it to an empty string to disable persistence) (PR #284, #103)π IMPROVE: Restore keyboard focus rings on tab labels, dropdown summaries, buttons and stretched-link cards, using
:focus-visibleso they are visible for keyboard users but not shown on mouse click, thanks to @gabalafou in PR #230 (carried in PR #283)π IMPROVE: Each tab label now carries an
aria-controlsattribute referencing its content panelβs id, establishing the programmatic relationship in the accessibility tree (note: this is not a full WAI-ARIA tabs pattern; assistive-technology support foraria-controlsvaries) (PR #283, #30)π FIX:
card/grid-item-card:link:no longer strips whitespace from reference targets (and lowercases them forlink-type: ref, matching the:ref:role), completing the fix for #110 (PR #282)π FIX:
button-refno longer strips whitespace from reference targets, so multi-word labels (e.g. fromautosectionlabel) resolve correctly (PR #281, #110)π FIX:
button-refnow renders rich/nested inline content (emphasis, icons, etc.) identically tobutton-link, instead of flattening it to plain text during cross-reference resolution (PR #281, #228)π FIX: Inline icon roles no longer leak SVG markup into toctree labels and the search index (PR #279, #99)
π FIX:
article-infoocticons regain theirsd-pr-2spacing class (previously silently dropped by the HTML writer) (PR #279)π FIX: Paragraphs inside dropdowns no longer have user classes overwritten by
sd-card-text, and card/dropdown body styling is applied only to direct child paragraphs, not nested content (PR #278, #40)β¨ NEW:
sphinx_design.testingmodule with thenormalize_doctree_xmlhelper, for downstream extensionsβ doctree regression tests (PR #277, #260)β»οΈ IMPROVE: Static assets (CSS/JS) are now served via Sphinxβs standard
html_static_pathmechanism, rather than being written directly into the build output; non-HTML builds no longer gain a spurious_sphinx_design_staticdirectory (PR #276, #200, #235). A stale_sphinx_design_staticdirectory left in an existing HTML build directory by previous versions is unused and can safely be deleted.β¬οΈ UPGRADE: Sphinx
>=7.2is now required (PR #276)ποΈ REMOVE: The private
sphinx_design._compat.findallhelper has been removed (docutilsElement.findallis guaranteed by the Sphinx floor); any code importing it should callnode.findall(...)directly (PR #276)π FIX: buttons are no longer destroyed by gettext translation: translated
button-link/button-refkeep their styling and links (gettext now targets only the button text), thanks to @sneakers-the-rat in PR #264 (#96, #44, #263)
0.7.0 - 2025-01-19#
Dependencies#
β¬οΈ Drop Python 3.9 & 3.10, support Python 3.14 by @chrisjsewell in PR #250
β¬οΈ Drop Sphinx v6, add Sphinx v9 support by @chrisjsewell in PR #250 and PR #255
β¬οΈ Update Material Design Icons to v4.0.0-116-ge9da21 by @2bndy5 in PR #223
Docs#
π Document
muted,white, andblacksemantic colors by @agriyakhetarpal in PR #216
0.6.1 - 2024-08-02#
β¬οΈ Update sphinx to >=6,<9 by @chrisjsewell in PR #212
π Reduce right-padding of dropdown title by @chrisjsewell in PR #198
0.6.0 - 2024-05-23#
Dependencies#
β¬οΈ Python v3.9-3.12 by @chrisjsewell in PR #186
New#
β¨ Create custom directives#
You can use the sd_custom_directives configuration option in your conf.py to add custom directives, with default option values:
sd_custom_directives = {
"dropdown-syntax": {
"inherit": "dropdown",
"argument": "Syntax",
"options": {
"color": "primary",
"icon": "code",
},
}
}
The key is the new directive name to add, and the value is a dictionary with the following keys:
inherit: The directive to inherit from (e.g.dropdown)argument: The default argument (optional, only for directives that take a single argument)options: A dictionary of default options for the directive (optional)
by @chrisjsewell in PR #194
β¨ sync tabs by URL query parameters#
Synchronised tabs can now be selected by adding a query parameter to the URL, for that sync-group, such as ?code=python for
.. tab-set-code::
.. literalinclude:: snippet.py
:language: python
.. literalinclude:: snippet.js
:language: javascript
The last selected tab key, per group, is also persisted to SessionStorage
by @mikemckiernan and @chrisjsewell in PR #196
Improve#
π Use reference name by default for internal link cards by @gabalafou in PR #183
π Improve specificity of JS function name by @danirus in PR #153
π Remove duplicate CSS hashing for sphinx >= 7.1 by @chrisjsewell in PR #193
π Improve dropdown title bar#
There are three visible changes:
The βdefaultβ behaviour of the right chevron is to go from right-facing (closed) to down-facing (open), instead of down-facing (closed) to up-facing (open). There is also a rotate transition on opening/closing. The old default behaviour can be retained by using the new
:chevron: down-updirective option.The prefix icon (optional), title text, and chevron state icon are now all better aligned
The top/bottom padding is now 0.5em instead of 1em
The PR also introduces three new CSS variables to control font sizes of the dropdown:
--sd-fontsize-tabs-label: 1rem;
--sd-fontsize-dropdown-title: 1rem;
--sd-fontweight-dropdown-title: 700;
Internally, the HTML / CSS is changed, such that the title is now an inline-flex box, with three columns arranged with justify-content: space-between:
icon (optional) |
text ( |
state chevron |
|---|---|---|
Also, the state chevron was previously two distinct SVGs (with one hidden), but now is one that get rotated on open/close.
by @chrisjsewell in PR #192
Fix#
π Fix tab-item label with nested syntax by @Praecordi in PR #135
π Fix do not close
inputtag by @chrisjsewell in PR #195
Internal#
π Update theme versions by @chrisjsewell in PR #189
π Make octicon list a table by @chrisjsewell in PR #188
π Add sphinx-immaterial to doc theme builds by @chrisjsewell in PR #190
π Change syntax dropdown color by @chrisjsewell in PR #191
π§ Add FIPS compliant flag to md5 call by @gabor-varga in PR #162
π§ define
build.osfor RTD to fix build by @sciencewhiz in PR #176π§ Move to ruff by @chrisjsewell in PR #185
Full Changelog: https://github.com/executablebooks/sphinx-design/compare/v0.5.0β¦v0.6.0
0.5.0 - 2023-07-27#
β¬οΈ Drop Python 3.7 support, by @chrisjsewell in PR #146
β¬οΈ UPGRADE: sphinx>=5,<8, by @chrisjsewell in PR #148
Full Changelog: https://github.com/executablebooks/sphinx-design/compare/v0.4.1β¦v0.5.0
v0.4.0 - 2023-04-13#
Full Changelog: https://github.com/executablebooks/sphinx-design/compare/v0.3.0β¦v0.4.0
Enhancements made#
Make default blue color a11y friendly. PR #124 (@feanil, @choldgraf)
Make card titles translatable PR #113 (@jpmckinney, @chrisjsewell)
Version upgrades#
Contributors to this release#
The following people contributed discussions, new ideas, code and documentation contributions, and review. See our definition of contributors.
v0.3.0 - 2022-08-22#
β¬οΈ Update Materials Design Icons to v4.0.0-46-gc9e5528, thanks to @2bndy5 (PR #69)
π FIX: dropdown/tab-item
:name:options (PR #91)π FIX: Docs build against non-html formats (PR #88)
π IMPROVE: Add card options
class-img-top/class-img-bottom(PR #92)π IMPROVE: Add
link-altto fix card link accessibility (PR #89)adds the
link-altoption tocard(andgrid-item-card) directives, in order to assign a discernable name to the link (for screen readers).
π IMPROVE: Make tab ids deterministic (PR #93)
Use increasing indices, rather than UUIDs
π§ MAINTAIN: Fix docutils
PendingDeprecationWarning(PR #94)π DOCS: Update font awesome icons (PR #64)
Full Changelog: https://github.com/executablebooks/sphinx-design/compare/v0.2.0β¦v0.3.0
v0.2.0 - 2022-06-14#
β¬οΈ Support Sphinx v5, drop v3
β¬οΈ Add Python 3.10 support
Full Changelog: https://github.com/executablebooks/sphinx-design/compare/v0.1.0β¦v0.2.0
v0.1.0 - 2022-04-21#
β¨ NEW: Add material design icons roles, thanks to @2bndy5 in PR #41
β¬οΈ UPGRADE: octicons to v16.1.1, thanks to @pocek in PR #43
π FIX: Links in card titles by @chrisjsewell in PR #59
π FIX: Exception on missing card link by @chrisjsewell in PR #60
π§ MAINTAIN: Move from setuptools to flit for package build by @chrisjsewell in PR #58
π§ MAINTAIN: Drop furo-specific stylesheet, thanks to @pradyunsg in PR #22
Full Changelog: https://github.com/executablebooks/sphinx-design/compare/v0.0.13β¦v0.1.0
v0.0.13 - 2021-10-27#
β¨ NEW: add icon far role (PR #35), thanks to @OriolAbril
π IMPROVE: Styling for tabs (PR #21), thanks to @pradyunsg
π IMPROVE: Properly remove the border on dropdown card body (PR #23), thanks to @pradyunsg
π FIX: sd-outline-* classes color (PR #25)
v0.0.11 - 2021-09-08#
β¨ NEW: Add ref-type option to button-ref directive
v0.0.10 - 2021-08-08#
β¨ NEW: Add grid-item directive child-direction and child-align options
β¨ NEW: Add card directive img-background option
v0.0.9 - 2021-06-08#
β»οΈ REFACTOR: test_sd_hide_root_title to sd_hide_title front-matter
π IMPROVE: dropdown chevrons
v0.0.8 - 2021-06-08#
β¨ NEW: Add test_sd_hide_root_title config option to hide the root title.
π IMPROVE: sd-card-hover:hover add scale 101%
π DOCS: Update landing page
v0.0.7 - 2021-05-08#
β¨ NEW: Add reverse option for grid directive
β¨ NEW: Add animations
v0.0.6 - 2021-04-08#
β¨ NEW: Add card-carousel directive
v0.0.5 - 2021-28-07#
π IMPROVE: Make octiconβs size variable
v0.0.4 - 2021-28-07#
π IMPROVE: Allow auto for grid columns
v0.0.3 - 2021-26-07#
π IMPROVE: Add more CSS classes and add documentation π
v0.0.2 - 2021-23-07#
Improve documentation π
v0.0.1 - 2021-22-07#
Initial release π