Skip to content

Default to the fuma theme and layer per-theme CSS - #165

Merged
timkpaine merged 2 commits into
mainfrom
tkp/fuma-default-theme
Oct 17, 2026
Merged

timkpaine merged 2 commits into
mainfrom
tkp/fuma-default-theme

Conversation

@timkpaine

@timkpaine timkpaine commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Description

Two related changes.

Default theme: unconfigured builds now resolve to fuma (sphinx-fuma) in both the docs and wiki configuration generators, so the sphinx_fuma extension is registered and the bundled fuma.css applies. furo stays a core dependency and bundled theme, so yardang preview still builds and publishes previews for every theme.

Bundled CSS/JS: resolution used to replace the bundled generic custom.css with a per-theme {theme}.css, so exactly one file was ever written. With fuma as the default, that meant fuma builds dropped the theme-agnostic rules in custom.css, and klink inherited furo's attribute-driven ones. The generic file is now always written and the per-theme file is appended when the theme ships one. furo's layout and data-theme rules move to a new furo.css, leaving custom.css as the generic base. The parsed rule set for furo is unchanged. An explicit custom-css / custom-js value still replaces both, and the output path (_static/styles/custom.css) is unchanged.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor / code cleanup
  • CI / build configuration
  • Other (describe below)

Checklist

  • Linting passes (make lint)
  • Tests pass (make test)
  • New tests added for new functionality
  • Documentation updated (if applicable)
  • Changelog / version bump (if applicable)

Local test run: 118 of 119 pass. yardang/tests/test_all.py::test_cli fails in this environment because the optional sphinxcontrib_rust extra is not installed; it fails identically with theme="furo", so it is unrelated to these changes.

Use fuma (sphinx-fuma) when no theme is configured, in both the docs and
wiki configuration generators. furo stays a core dependency and bundled
theme so its preview still builds.

Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

119 tests  +2   119 ✅ +2   33s ⏱️ -1s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit f942c03. ± Comparison against base commit 4f3d959.

This pull request removes 4 and adds 6 tests. Note that renamed tests count towards both.
yardang.tests.test_themes.TestResolveCustomAsset ‑ test_falls_back_to_custom_css
yardang.tests.test_themes.TestResolveCustomAsset ‑ test_falls_back_to_custom_js
yardang.tests.test_themes.TestResolveCustomAsset ‑ test_prefers_theme_specific_file
yardang.tests.test_themes.TestResolveCustomAsset ‑ test_shibuya_theme_specific_file
yardang.tests.test_themes.TestDefaultTheme ‑ test_unconfigured_theme_is_fuma
yardang.tests.test_themes.TestGenerateDocsThemeAssets ‑ test_default_theme_keeps_generic_defaults
yardang.tests.test_themes.TestResolveCustomAsset ‑ test_furo_rules_are_appended_after_generic_defaults
yardang.tests.test_themes.TestResolveCustomAsset ‑ test_generic_defaults_apply_to_every_theme
yardang.tests.test_themes.TestResolveCustomAsset ‑ test_generic_js_is_used_when_theme_ships_no_js
yardang.tests.test_themes.TestResolveCustomAsset ‑ test_theme_rules_are_appended_after_generic_defaults

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.87234% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 89.02%. Comparing base (4f3d959) to head (f942c03).

Files with missing lines Patch % Lines
yardang/build.py 88.88% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #165      +/-   ##
==========================================
+ Coverage   88.92%   89.02%   +0.10%     
==========================================
  Files          16       16              
  Lines        2068     2096      +28     
  Branches      212      214       +2     
==========================================
+ Hits         1839     1866      +27     
  Misses        160      160              
- Partials       69       70       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Resolution used to replace the bundled generic custom.css with {theme}.css, so
fuma builds lost the theme-agnostic rules and klink had to inherit furo's
attribute-driven ones. Write the generic file first and append {theme}.css when
the theme ships one, and move furo's layout and data-theme rules into furo.css.

Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
@timkpaine timkpaine changed the title Default to the fuma theme Default to the fuma theme and layer per-theme CSS Oct 16, 2026
@timkpaine
timkpaine merged commit 91ddc0f into main Oct 17, 2026
4 checks passed
@timkpaine
timkpaine deleted the tkp/fuma-default-theme branch October 17, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant