sidebar and navbar have dark logo when dark mode is disabled
@gordonwoodhull is already working on this.
Since Jul 1, 2025.
Assessment
This issue has not been assessed yet.
Description
In PR #12996, implementing #12981 dark theme enables dark brand along with light and dark logo, I seem to have painted myself into a corner and created a harmless but still glaring bug for anyone who looks at the HTML output.
That PR changes the signature of resolveBrand() to return light and dark brand as before, but now it always returns both and a flag enablesDarkMode.
This is because we don't know until mergeFormatData() in resolveFormats() whether light and dark themes are specified, to know whether we need to enable the dark brand.
At that point we have combined the project metadata, document metadata, and crucially, we've also combined things like
format:
html:
theme:
light: ...
dark: ...
Since the sidebar and navbar are initialized before any documents, they still have to use resolveBrand() instead of the resolved format.render.brand
This manifests as an invisible .dark-content logo in the sidebar or navbar when dark mode is not enabled. Maybe it would be possible to resolve format.html.theme and do a mini mergeConfigs on the project metadata to fix this?
Originally posted by @gordonwoodhull in https://github.com/quarto-dev/quarto-cli/issues/12996#issuecomment-3019843781
To be clear, we do have access to the project metadata when running project.resolveBrand(), it's just that it hasn't been normalized and merged.
So there are two questions:
- can we resolve the project metadata in a robust way during
project.resolveBrand(), enough to know whether there is a dark theme? - does it matter that a document could conceivably enable (or disable) dark mode through document theme settings, or do we have to also merge the document metadata during
project.resolveBrand()to know whether dark mode is enabled. (Reminiscent of #11309.)
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from quarto-dev/quarto-cli
-
binder bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
quarto-dev/quarto-cli#14907 · 3 comments ·
-
brand bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
quarto-dev/quarto-cli#14891 ·
-
brand bug html revealjs
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
quarto-dev/quarto-cli#14882 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
quarto-dev/quarto-cli#14875 ·
-
Percent scripts: accept raw-string (r""") and '''-delimited markdown cells, as jupytext writes them Openengines-jupyter enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
quarto-dev/quarto-cli#14850 · 2 comments ·
All issues in quarto-dev/quarto-cli
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
babalae/bettergi-scripts-list#3674 ·
-
ecosystem wording
Difficulty 1/5 Under an hour Newbie friendliness 90/100
matrix-org/matrix.org#3649 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
vadimdemedes/ink#1029 ·
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·