Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

draft mdBook chapter titles are unreadable in oranda-dark and oranda-light mdBook theme #654

Closed
hawkw opened this issue Oct 5, 2023 · 2 comments · Fixed by #655
Closed

Comments

@hawkw
Copy link
Contributor

hawkw commented Oct 5, 2023

mdBook has a concept of "draft chapters", where the chapter name appears in the table of contents but no page actually exists for that chapter. these chapter titles are greyed out in the table of contents. when rendering a mdBook using Oranda, the default oranda-dark and oranda-light themes color the the names of these draft chapters the same as the background color, rendering them unreadable.

with all other mdBook themes provided by Oranda, the draft chapter titles are basically readable. for example, with the mdBook "navy" theme, they look like this:
image

with the oranda-dark theme, though, the draft chapter titles are the same as the background:
image

and similarly, with the oranda-light theme, they are white (as is the background):
image

@shadows-withal
Copy link
Contributor

Good call, this also came up on Discord, I think.

@06chaynes
Copy link
Contributor

06chaynes commented Oct 5, 2023

This is probably too naive a solution for this but thought I would throw the idea out.

In oranda-css/mdbook-theme/css/chrome.css:

.chapter li.chapter-item div {
    color: var(--sidebar-fg);
    filter: brightness(70%);
}

Produces:
Screenshot 2023-10-05 at 2 44 50 PM

I haven't noticed any unintended side effects from this yet but haven't checked all the themes or what not.

JIC this is acceptable I opened PR #655, feel free to close if otherwise though!

hawkw added a commit to tosc-rs/mnemos that referenced this issue Jan 19, 2024
This commit updates Oranda from v0.3.1 to v0.6.1. I don't believe any of
the new Oranda features are particularly relevant to us, but there are
some nice bugfixes, including axodotdev/oranda#654, which fixes
unreadable CSS colors for mdBook draft chapters in the Oranda CSS themes
which we use.

Also, since axodotdev/oranda#609 has merged upstream, we can change the
Nix flake to depend on upstream Oranda rather than my fork.
hawkw added a commit to tosc-rs/mnemos that referenced this issue Jan 19, 2024
This commit updates Oranda from v0.3.1 to v0.6.1. I don't believe any of
the new Oranda features are particularly relevant to us, but there are
some nice bugfixes, including axodotdev/oranda#654, which fixes
unreadable CSS colors for mdBook draft chapters in the Oranda CSS themes
which we use.

Also, since axodotdev/oranda#609 has merged upstream, we can change the
Nix flake to depend on upstream Oranda rather than my fork.
hawkw added a commit to tosc-rs/mnemos that referenced this issue Jan 19, 2024
This commit updates Oranda from v0.3.1 to v0.6.1. I don't believe any of
the new Oranda features are particularly relevant to us, but there are
some nice bugfixes, including axodotdev/oranda#654, which fixes
unreadable CSS colors for mdBook draft chapters in the Oranda CSS themes
which we use.

Also, since axodotdev/oranda#609 has merged upstream, we can change the
Nix flake to depend on upstream Oranda rather than my fork.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants