Skip to content

Commit a4ea425

Browse files
committed
doc: add "Skip to content" button
PR-URL: nodejs/node#56750 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com> Reviewed-By: Claudio Wunder <cwunder@gnome.org>
1 parent 1da598d commit a4ea425

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/generators/legacy-html/assets/style.css

+14
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,20 @@ a.type {
142142
font-size: 0.9em;
143143
}
144144

145+
.skip-to-content {
146+
position: fixed;
147+
top: -300%;
148+
}
149+
150+
.skip-to-content:focus {
151+
display: block;
152+
top: 0;
153+
left: 0;
154+
background-color: var(--green1);
155+
padding: 1rem;
156+
z-index: 999999;
157+
}
158+
145159
#content {
146160
position: relative;
147161
}

src/generators/legacy-html/template.html

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
</style>
4040
</head>
4141
<body class="alt apidoc" id="api-section-__FILENAME__">
42+
<a href="#apicontent" class="skip-to-content">Skip to content</a>
4243
<div id="content" class="clearfix">
4344
<div role="navigation" id="column2" class="interior">
4445
<div id="intro" class="interior">

0 commit comments

Comments
 (0)