Add styles to support printing the tutorial#771
Add styles to support printing the tutorial#771sruggier wants to merge 1 commit intotokio-rs:masterfrom
Conversation
|
Thanks. I tried it and it looks ok. However, there's a CI failure due to the "prettier" formatter. |
9d23a80 to
71c5c32
Compare
|
Thanks, it should be fixed now. I also added a bit of detail to the first commit's subject and description. |
|
@Darksonn Would you mind re-approving the CI workflow? It should pass now. |
|
@sruggier I just re-ran tests. (It seems that some tests are still failing, though) |
71c5c32 to
666e62d
Compare
666e62d to
daa9dfe
Compare
daa9dfe to
6e26f7c
Compare
mox692
left a comment
There was a problem hiding this comment.
Sorry for the delay, I left a comment about dependency addition, but otherwise looks good to me!
styles/styles.scss
Outdated
| $footer-color: white; | ||
|
|
||
| @import "../node_modules/bulma/bulma.sass"; | ||
| @import "../node_modules/bulma-print/bulma-print"; |
There was a problem hiding this comment.
Apparently, what this import refers to is just a few lines of CSS, so I think we can simply paste it inline in styles/styles.scss rather than adding bulma-print. What do you think?
(Also, it seems that bulma-print library hasn't been updated for some time.)
There was a problem hiding this comment.
Thanks for the suggestion! I explored inlining only the needed declarations, which turned out to be just one, and I think this version of the PR is much better overall.
I also looked at the home page and a few blog posts, made a few improvements, and now the entire site should look reasonable when printed.
6e26f7c to
206b91b
Compare
This adds printing-specific styles, which hide the navigation elements, remove excess whitespace, wrap code blocks, and avoid breaking them across separate pages, if possible. This makes it possible to export the website and documentation to PDF or paper, for offline reading.
206b91b to
fd150da
Compare
|
@carllerche @Darksonn Sorry to bother you, but do either of you have a bit of time to review this? It should be much simpler now that the PR is only adding a single hunk of well-commented CSS. |
In particular, this makes it possible to save an offline copy of the tutorial to PDF or paper, or any blog posts of interest.