Skip to content

Node.js documentation is not print-friendly #6743

Description

@sorcamarian

Can not print Node.js documentation from: https://nodejs.org/api/all.html .

Some CSS rules are not appropriate for print mode.
Before:
image

Fortunately, I found an simple solution(below).

At the bottom of style.css add this CSS rule:

@media print {

  html  {
    height : auto;
  }

 #column2.interior {
   display : none;
 }

 #column1.interior {
   margin-left : auto;
   overflow-y  :  auto;
 }

}

After my CSS codes:
image

Activity

added
docIssues and PRs related to Node.js documentation.
feature requestIssues requesting new Node.js features.
on May 13, 2016

mscdex commented on May 13, 2016

@mscdex
Contributor

/cc @nodejs/documentation

MylesBorins commented on May 13, 2016

@MylesBorins
Contributor

@sorcamarian I was unaware of @ media print.. that is nifty.

Would you be open to sending a pull request with your changes? If you have never done so before I'd be more than happy to help you figure out how to do it!

sorcamarian commented on May 13, 2016

@sorcamarian
Author

@thefourtheye
Yes, I would like to send a pull request.
Please tell me how and where to send the request.

Thanks

MylesBorins commented on May 13, 2016

@MylesBorins
Contributor

@sorcamarian I believe if you clone the repo you should be able to add your style to this file --> https://github.com/nodejs/node/blob/master/doc/api_assets/style.css

it will be found in the cloned repo at doc/api_assets/style.css

After you have committed your changes you will be able to use the github API to send the PR

You can find more details about how to clone the repo and what not in our contributing guide. Please feel free to ping me here, on twitter via dm, or on irc if you have issues. You could likely even use the github website to edit that file in place and make a pull request.

Once you have the PR in we can do a review and help you get the commit to a point where we can merge it!

self-assigned this
on May 13, 2016

sorcamarian commented on May 13, 2016

@sorcamarian
Author

@thealphanerd
I sent the commit.

Thank you!

MylesBorins commented on May 13, 2016

@MylesBorins
Contributor

@sorcamarian I'm not seeing the pull request.. can you share the link to it with me?

sorcamarian commented on May 13, 2016

@sorcamarian
Author

I think I succeeded: #6748

sorcamarian commented on May 14, 2016

@sorcamarian
Author

Please check if the commit is ok.
https://github.com/nodejs/node/pull/6748/commits

Thanks.

added a commit that references this issue on Jun 2, 2016
added a commit that references this issue on Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

docIssues and PRs related to Node.js documentation.feature requestIssues requesting new Node.js features.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions