Skip to content

Fix print output inheriting screen theme colors - #3169

Open
giri256 wants to merge 1 commit into
rust-lang:mainfrom
giri256:fix/print-light-palette
Open

giri256 wants to merge 1 commit into
rust-lang:mainfrom
giri256:fix/print-light-palette

Conversation

@giri256

@giri256 giri256 commented Jul 27, 2026

Copy link
Copy Markdown

Fixes #1934.

Summary

  • reset print-only content variables to mdBook's existing light palette
  • keep all selected screen themes unchanged
  • cover page, text, quotes, tables, keyboard keys, footnotes, and callouts through the shared variables

Verification

  • Chrome print-media computed-style matrix for ayu, coal, light, navy, rust, and no-JavaScript navy
  • navy screen-media negative control
  • cargo test -p mdbook-html --lib
  • cargo fmt --check
  • git diff --check

Signed-off-by: Giridhar <80974392+giri256@users.noreply.github.com>
@rustbot rustbot added the S-waiting-on-review Status: waiting on a review label Jul 27, 2026
@GuillaumeGomez

Copy link
Copy Markdown
Member

Instead of redefining the variables, would be simpler to find a way to reuse the light variables from variables.css.

@GuillaumeGomez GuillaumeGomez added S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. and removed S-waiting-on-review Status: waiting on a review labels Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Print page is inheriting some theme colors

3 participants