Skip to content

Commit 711245e

Browse files
silverwindrvagg
authored andcommitted
doc: style fixes for the TOC
- Hide the scrollbar on the TOC on all browsers. It was never the intention for it to be visible with the scroll indication in place. A wrapper element with 20px padding was added to accommodate for hopefully all scrollbar widths as well as to avoid overflowing content. - Fixed the scroll indication gradient on Safari, which was caused by the wrong from-color, which now matches the to-color. - Fixed a issue in old IE where the TOC didn't render on the correct position through setting `left: 0` and `top: 0` on it. PR-URL: #4748 Reviewed-By: James M Snell <[email protected]>
1 parent fa940cf commit 711245e

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

‎doc/api_assets/style.css‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,18 +370,27 @@ span.type{
370370
width:234px;
371371
background:#333;
372372
position: fixed;
373+
left:0;
374+
top:0;
373375
height:100%;
376+
overflow: hidden;
377+
}
378+
379+
#column2 .no-scrollbar{
374380
overflow-y: scroll;
381+
height:100%;
382+
width:100%;
383+
padding-right:20px;
375384
}
376385

377-
#column2.interior:after{
386+
#column2 .no-scrollbar:after{
378387
content:'';
379388
position: fixed;
380389
bottom:0;
381390
left:0;
382391
width:234px;
383392
height:4em;
384-
background:linear-gradient(rgba(242,245,240,0),rgba(51,51,51,1));
393+
background:linear-gradient(rgba(51,51,51,0),rgba(51,51,51,1));
385394
pointer-events: none;
386395
}
387396

‎doc/template.html‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@
1111
<bodyclass="alt apidoc" id="api-section-__FILENAME__">
1212
<divid="content" class="clearfix">
1313
<divid="column2" class="interior">
14-
<divid="intro" class="interior">
15-
<ahref="/" title="Go back to the home page">
16-
Node.js (1)
17-
</a>
14+
<divclass="no-scrollbar">
15+
<divid="intro" class="interior">
16+
<ahref="/" title="Go back to the home page">
17+
Node.js (1)
18+
</a>
19+
</div>
20+
__GTOC__
1821
</div>
19-
__GTOC__
2022
</div>
2123

2224
<divid="column1" data-id="__ID__" class="interior">

0 commit comments

Comments
(0)