]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Docs: add scroll-margin-top for keyboard navigation
authorPatrick H. Lauke <redux@splintered.co.uk>
Sat, 21 Jan 2023 22:55:38 +0000 (22:55 +0000)
committerMark Otto <otto@github.com>
Tue, 14 Feb 2023 16:53:25 +0000 (08:53 -0800)
site/assets/scss/_scrolling.scss [new file with mode: 0644]
site/assets/scss/docs.scss

diff --git a/site/assets/scss/_scrolling.scss b/site/assets/scss/_scrolling.scss
new file mode 100644 (file)
index 0000000..dcd9f3d
--- /dev/null
@@ -0,0 +1,5 @@
+// When navigating with the keyboard, prevent focus from landing behind the sticky header
+
+main *:focus {
+  scroll-margin-top: 100px;
+}
index 9d71147a80a0d9d1abe9ecf715ff3dc8e1e1d9a1..fb85262e78b567f6e5b1cf027fc2ffa64fd39a6d 100644 (file)
@@ -52,6 +52,7 @@ $enable-cssgrid: true; // stylelint-disable-line scss/dollar-variable-default
 @import "colors";
 @import "clipboard-js";
 @import "placeholder-img";
+@import "scrolling";
 
 // Load docs dependencies
 @import "syntax";