diff --git a/crates/mdbook-html/front-end/css/chrome.css b/crates/mdbook-html/front-end/css/chrome.css index bab38894f4..bc50258db0 100644 --- a/crates/mdbook-html/front-end/css/chrome.css +++ b/crates/mdbook-html/front-end/css/chrome.css @@ -1,5 +1,21 @@ /* CSS for UI elements (a.k.a. chrome) */ +.skip-to-content { + position: absolute; + top: -100px; + left: 0; + padding: 0.5rem 1rem; + background-color: var(--bg); + color: var(--fg); + z-index: 1000; + text-decoration: none; + border: 2px solid var(--links); +} + +.skip-to-content:focus { + top: 0; +} + html { scrollbar-color: var(--scrollbar) transparent; } diff --git a/crates/mdbook-html/front-end/templates/index.hbs b/crates/mdbook-html/front-end/templates/index.hbs index b1834189f9..5526004a38 100644 --- a/crates/mdbook-html/front-end/templates/index.hbs +++ b/crates/mdbook-html/front-end/templates/index.hbs @@ -63,6 +63,7 @@
+ Skip to main content