Skip to content

Book should be printable #21901

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

Closed
vrinek opened this issue Feb 3, 2015 · 16 comments
Closed

Book should be printable #21901

vrinek opened this issue Feb 3, 2015 · 16 comments
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@vrinek
Copy link
Contributor

vrinek commented Feb 3, 2015

Currently if you try printing the book it comes out blank.

There is something missing in the CSS. I am already on it and have a hunch what it might be but wanted to post it here in case someone else wants to give it a hand or even carry it further (make it pretty perhaps?).

@jroesch
Copy link
Member

jroesch commented Feb 3, 2015

cc @steveklabnik

@kmcallister kmcallister added A-docs T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. labels Feb 4, 2015
@frewsxcv
Copy link
Member

frewsxcv commented Feb 4, 2015

@vrinek Are you trying to print a single page or the whole book?

@vrinek
Copy link
Contributor Author

vrinek commented Feb 4, 2015

I'm only trying to print a single page for now. Sadly I have failed to find where rust-book.css is generated from (after deleting https://github.com/rust-lang/rust/blob/master/src/doc/trpl/rust-book.css, it kept regenerating).

The changes I want to do are showcased here: https://github.com/rust-lang/rust/blob/master/src/doc/trpl/rust-book.css.

If someone could point me to the right place where I should apply these changes, I would be grateful.

@frewsxcv
Copy link
Member

frewsxcv commented Feb 4, 2015

FWIW, If I try to print a single page it doesn't show up blank

screen shot 2015-02-04 at 3 51 21 pm

That said, there's still room for improvement. What browser/OS are you using? I'm using OSX with the latest stable Firefox.

@sfackler
Copy link
Member

sfackler commented Feb 4, 2015

It comes out pretty busted with Chrome on OSX:

the rust programming language

@iKevinY
Copy link
Contributor

iKevinY commented Feb 4, 2015

Safari on OS X acts the same way as shown in @sfackler's screenshot, so maybe it's WebKit-related?

@frewsxcv
Copy link
Member

frewsxcv commented Feb 4, 2015

Even if WebKit/Blink was able to replicate my Firefox screenshot, I'd say there still needs to be better print styling defaults. For example, we probably won't need the sidebar.

@steveklabnik
Copy link
Member

steveklabnik commented Feb 4, 2015 via email

@steveklabnik
Copy link
Member

steveklabnik commented Feb 4, 2015 via email

@bluss
Copy link
Member

bluss commented Feb 4, 2015

If you try to print a longer chapter, you'll see that you get only the first page (Firefox). That's more than bad styling :)

@frewsxcv
Copy link
Member

frewsxcv commented Feb 4, 2015

@steveklabnik If you can easily find the other print CSS related issues, it might benefit this issue for the sake of deduplicating issues. The only I found was this one

@steveklabnik
Copy link
Member

@frewsxcv that was the one on the top of my head, maybe it's just that one

@vrinek
Copy link
Contributor Author

vrinek commented Feb 5, 2015

@steveklabnik I bet you meant https://github.com/rust-lang/rust/blob/master/src/rustbook/css.rs (the one you linked was javascript). I'll fix it up and send a PR.

@steveklabnik
Copy link
Member

err yes, I did. Nice catch 😅

@vrinek
Copy link
Contributor Author

vrinek commented Feb 5, 2015

PR ready: #21962

@mdinger
Copy link
Contributor

mdinger commented Feb 13, 2015

PR #21962 merged so this should be fixed and closable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

9 participants