Node: Node.js documentation is not print-friendly

Created on 13 May 2016  路  8Comments  路  Source: nodejs/node

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

doc feature request

All 8 comments

/cc @nodejs/documentation

@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!

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

Thanks

@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!

@TheAlphaNerd
I sent the commit.

Thank you!

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

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

Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sandeepks1 picture sandeepks1  路  3Comments

addaleax picture addaleax  路  3Comments

stevenvachon picture stevenvachon  路  3Comments

akdor1154 picture akdor1154  路  3Comments

danielstaleiny picture danielstaleiny  路  3Comments