Skip to content

fix(docs): keep the theme switch layout after a click (#518) - #520

Merged
q-soriarty merged 2 commits into
developfrom
fix/518-theme-switch
Nov 18, 2026
Merged

q-soriarty merged 2 commits into
developfrom
fix/518-theme-switch

Conversation

@q-soriarty

Copy link
Copy Markdown
Contributor

Summary

The theme switch in the docs header lost its dot and its centred label after a click. The cause was in the brand theme: MkDocs Material's .md-option:checked + label:not([hidden]) { display: block } (specificity 0,3,1) beat the theme's .q-theme:not([hidden]) { display: inline-flex } (0,2,0) once the visible label followed the checked input. Brand v0.3.1 adds a (0,4,0) selector for the same layout (qubernetic/brand#15, qubernetic/brand#16).

This PR moves the docs/site/brand submodule from v0.1.0 to v0.3.1 and adds a changelog entry. Between the two tags, that fix is the only change under mkdocs/material; v0.2.0 and v0.3.0 added the herdr and Konsole themes, which the site does not use.

The indigo/custom palette difference noted in the issue is not related and is left as it is.

Test plan

  • just docs and just docs-build (mkdocs build --strict) pass locally
  • The built qubernetic.css contains .md-option:checked + .q-theme:not([hidden])
  • Local build in Chrome: after three clicks (Dark, Auto, Light) the visible label stays display: flex and the dot stays 10x10 px; a real mouse click shows the dot and the centred label
  • After the merge to main, docs.yml deploys the site and the switch keeps its layout on https://qubernetic.github.io/copia-cli/manual/

Closes #518

The brand theme's v0.3.1 keeps the header theme switch a flex row after
a click: MkDocs Material's `.md-option:checked + label:not([hidden])`
rule set it to `display: block`, which shrank the dot to a thin line and
moved the label to the top of the button (qubernetic/brand#15).

Between v0.1.0 and v0.3.1 that fix is the only change to the theme
files under mkdocs/material; v0.2.0 and v0.3.0 added herdr and Konsole
themes, which the site does not use.

Refs #518
@codecov

codecov Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@q-soriarty
q-soriarty marked this pull request as ready for review November 18, 2026 09:23
@q-soriarty
q-soriarty merged commit d46f460 into develop Nov 18, 2026
12 checks passed
@q-soriarty
q-soriarty deleted the fix/518-theme-switch branch November 18, 2026 09:28
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