Skip to content

Commit

Permalink
doc: adjusting formatting when printing
Browse files Browse the repository at this point in the history
- 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 <[email protected]>
Reviewed-By: Bryan English <[email protected]>
  • Loading branch information
tlhunter authored and codebytere committed Jan 29, 2019
1 parent 3b6135f commit e11d46c
Showing 1 changed file with 40 additions and 1 deletion.
41 changes: 40 additions & 1 deletion doc/api_assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -533,12 +533,51 @@ th > *:last-child, td > *:last-child {
@media print {
html {
height: auto;
font-size: 0.75em;
}
#column2.interior {
display: none;
}
#column1.interior {
margin-left: auto;
margin-left: 0px;
padding: 0px;
overflow-y: auto;
}
.api_metadata,
#toc,
.srclink,
#gtoc,
.mark {
display: none;
}
h1 {
font-size: 2rem;
}
h2 {
font-size: 1.75rem;
}
h3 {
font-size: 1.5rem;
}
h4 {
font-size: 1.3rem;
}
h5 {
font-size: 1.2rem;
}
h6 {
font-size: 1.1rem;
}
.api_stability {
display: inline-block;
}
.api_stability a {
text-decoration: none;
}
a {
color: inherit;
}
#apicontent {
overflow: hidden;
}
}

0 comments on commit e11d46c

Please sign in to comment.