Skip to content

fix(theme): detect Material's slate scheme as dark mode#37

Merged
Erlend Ellefsen (erlendellefsen) merged 2 commits into
mainfrom
fix/slate-darkmode-and-extract-theme-js
May 8, 2026
Merged

fix(theme): detect Material's slate scheme as dark mode#37
Erlend Ellefsen (erlendellefsen) merged 2 commits into
mainfrom
fix/slate-darkmode-and-extract-theme-js

Conversation

@erlendellefsen
Copy link
Copy Markdown
Collaborator

Summary

  • Map both slate (Material standard) and dark (previous plugin docs) to bf-darkmode. Fixes a silent mismatch where Material renders dark but Bifrost stayed light.
  • Extract the inline <script> from main.html into overrides/javascripts/bifrost-theme.js as pure functions with a UMD wrapper. Version moves to a <meta> tag so the JS file is fully static and unit-testable.
  • New JS Test CI job runs node --test against 22 unit tests covering scheme/primary mapping, theme switching, and badge insertion.

Closes #34.

@erlendellefsen Erlend Ellefsen (erlendellefsen) merged commit 82624b3 into main May 8, 2026
4 checks passed
@erlendellefsen Erlend Ellefsen (erlendellefsen) deleted the fix/slate-darkmode-and-extract-theme-js branch May 8, 2026 12:49
Erlend Ellefsen (erlendellefsen) pushed a commit that referenced this pull request May 8, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.7.1](v0.7.0...v0.7.1)
(2026-05-08)


### Fixes

* **theme:** detect Material's slate scheme as dark mode
([#37](#37))
([82624b3](82624b3))


### Code refactoring

* **css:** drop extra.css, layer Bifrost framework, strip important
([#39](#39))
([6b868f7](6b868f7))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: bifrost-mkdocs-release-bot[bot] <263594613+bifrost-mkdocs-release-bot[bot]@users.noreply.github.com>
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.

Fix dark-mode detection for Material's slate scheme + extract theme-sync JS

1 participant