Skip to content

Commit 09fb3ad

Browse files
committed
doc: add "Skip to content" button
PR-URL: #56750 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ulises Gascón <[email protected]> Reviewed-By: Claudio Wunder <[email protected]>
1 parent ad012ca commit 09fb3ad

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

doc/api_assets/style.css

+13
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,19 @@ a.type {
122122
font-size: .9em;
123123
}
124124

125+
.skip-to-content {
126+
position: fixed;
127+
top: -300%;
128+
}
129+
.skip-to-content:focus {
130+
display: block;
131+
top: 0;
132+
left: 0;
133+
background-color: var(--green1);
134+
padding: 1rem;
135+
z-index: 999999;
136+
}
137+
125138
#content {
126139
position: relative;
127140
}

doc/template.html

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
__JS_FLAVORED_DYNAMIC_CSS__
2727
</head>
2828
<body class="alt apidoc" id="api-section-__FILENAME__">
29+
<a href="#apicontent" class="skip-to-content">Skip to content</a>
2930
<div id="content" class="clearfix">
3031
<div role="navigation" id="column2" class="interior">
3132
<div id="intro" class="interior">

0 commit comments

Comments
 (0)