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

doc: adjusting formatting when printing #24325

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
6 participants
@tlhunter
Copy link
Contributor

tlhunter commented Nov 12, 2018

As a weekend project I built a PDF generator for the Node.js docs. This project required making small changes to the documentation CSS for aesthetics. Take a look at these PDF files to view the CSS changes in action.

Here's an overview of these changes:

  • reduce page margin
  • remove emphasis from links as they're unclickable
    • i.e. color, and underlines when in deprecated block
  • hides expandable > history items since they're collapsed and unreadable
    • alternative: I can make these always expanded instead
  • removes horizontal scrollbar from bottom of print output
  • reduce stability rectangle sizes
    • normally they're full width, now they're as wide as the text
  • shrink all text and headlines slightly
    • they're now closer to what you'd find in a book
  • hide ToC
    • it takes up many many pages and is ultimately unclickable
Checklist
doc: adjusting formatting when printing
- reduces page margins
- removes emphasis from links
- hides expandable history items
- removes horizontal scrollbar from bottom of print output
- reduce stability rectangle sizes
- shrink headlines slightly
- hide ToC (as it's unclickable when printed)

Ref: https://thomashunter.name/nodejs-documentation-pdf
@tlhunter

This comment has been minimized.

Copy link
Contributor

tlhunter commented Nov 12, 2018

/cc @refack

@refack

This comment has been minimized.

Copy link
Member

refack commented Nov 12, 2018

Hello @tlhunter and thank you for the contribution!

@refack

This comment has been minimized.

Copy link
Member

refack commented Nov 12, 2018

Lite CI https://ci.nodejs.org/job/node-test-pull-request-lite-pipeline/1586/

I'll setup a demo site so we can compare the generated docs.

@tlhunter tlhunter referenced this pull request Nov 12, 2018

Open

TODO #1

@Trott

This comment has been minimized.

Copy link
Member

Trott commented Nov 17, 2018

@Trott

This comment has been minimized.

Copy link
Member

Trott commented Nov 17, 2018

Since these are all under @media print, I think they're all pretty safe. And as you're actually generating PDFs and making them available to the public for offline use, I think you've got a pretty solid stake as a primary use case.

LGTM

@Trott

Trott approved these changes Nov 17, 2018

@bengl

bengl approved these changes Nov 17, 2018

Trott added a commit to Trott/io.js that referenced this pull request Nov 17, 2018

doc: adjusting formatting when printing
- reduces page margins
- removes emphasis from links
- hides expandable history items
- removes horizontal scrollbar from bottom of print output
- reduce stability rectangle sizes
- shrink headlines slightly
- hide ToC (as it's unclickable when printed)

Ref: https://thomashunter.name/nodejs-documentation-pdf

PR-URL: nodejs#24325
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
@Trott

This comment has been minimized.

Copy link
Member

Trott commented Nov 17, 2018

Landed in 344a46a

@Trott Trott closed this Nov 17, 2018

@refack

This comment has been minimized.

@refack

This comment has been minimized.

Copy link
Member

refack commented Nov 17, 2018

Maybe we can follow up with an improvement to the visual of class="api_stability api_stability_2"

@WaleedAshraf

This comment has been minimized.

Copy link
Member

WaleedAshraf commented Nov 17, 2018

I see this in print preview on chrome using @refack links.

Pre:

screenshot 2018-11-17 at 11 09 08 pm

Post:

screenshot 2018-11-17 at 11 09 26 pm

@refack

This comment has been minimized.

Copy link
Member

refack commented Nov 17, 2018

I see this in print preview on chrome using @refack links.

@WaleedAshraf Do you have "Background Graphics" checked?
image

@WaleedAshraf

This comment has been minimized.

Copy link
Member

WaleedAshraf commented Nov 18, 2018

@refack Got it.
Yup, with "Background graphics" it's the same view as you posted above.

targos added a commit that referenced this pull request Nov 18, 2018

doc: adjusting formatting when printing
- reduces page margins
- removes emphasis from links
- hides expandable history items
- removes horizontal scrollbar from bottom of print output
- reduce stability rectangle sizes
- shrink headlines slightly
- hide ToC (as it's unclickable when printed)

Ref: https://thomashunter.name/nodejs-documentation-pdf

PR-URL: #24325
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>

@tlhunter tlhunter deleted the tlhunter:print-css branch Nov 19, 2018

rvagg added a commit that referenced this pull request Nov 28, 2018

doc: adjusting formatting when printing
- reduces page margins
- removes emphasis from links
- hides expandable history items
- removes horizontal scrollbar from bottom of print output
- reduce stability rectangle sizes
- shrink headlines slightly
- hide ToC (as it's unclickable when printed)

Ref: https://thomashunter.name/nodejs-documentation-pdf

PR-URL: #24325
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>

@BridgeAR BridgeAR referenced this pull request Dec 5, 2018

Merged

v11.4.0 proposal #24854

4 of 4 tasks complete

codebytere added a commit that referenced this pull request Jan 12, 2019

doc: adjusting formatting when printing
- reduces page margins
- removes emphasis from links
- hides expandable history items
- removes horizontal scrollbar from bottom of print output
- reduce stability rectangle sizes
- shrink headlines slightly
- hide ToC (as it's unclickable when printed)

Ref: https://thomashunter.name/nodejs-documentation-pdf

PR-URL: #24325
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>

@codebytere codebytere referenced this pull request Jan 15, 2019

Open

v10.15.1 proposal #25346

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment