]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
docs(skippy): prevent skip links from overlapping header
authorGaël Poupard <gael.poupard@orange.com>
Mon, 20 Jul 2020 09:26:41 +0000 (11:26 +0200)
committerXhmikosR <xhmikosr@gmail.com>
Mon, 3 Aug 2020 16:06:36 +0000 (19:06 +0300)
site/_includes/skippy.html
site/docs/4.5/assets/scss/_skippy.scss

index ec7507d53273ddb893da0ad7c5ef94bb506f65a5..4fb12b8bd09b08c5746471a1eb6118dc8d7bec9c 100644 (file)
@@ -1,3 +1,8 @@
-<a class="skippy sr-only sr-only-focusable" href="#content">
-  <span class="skippy-text">Skip to main content</span>
-</a>
+<div class="skippy overflow-hidden">
+  <div class="container-xl">
+    <a class="sr-only sr-only-focusable d-inline-flex p-2 m-1" href="#content">Skip to main content</a>
+    {%- if page.layout == "docs" -%}
+      <a class="sr-only sr-only-focusable d-none d-md-inline-flex p-2 m-1" href="#bd-docs-nav">Skip to docs navigation</a>
+    {%- endif -%}
+  </div>
+</div>
index bd2aadb82a2de6aed3b1f543a29adcc4db319b32..894db70db4e77a1a593d3bb3952f6e609cc19b96 100644 (file)
@@ -1,17 +1,20 @@
+// stylelint-disable declaration-no-important
+
 .skippy {
-  display: block;
-  padding: 1em;
-  color: $white;
-  text-align: center;
   background-color: $bd-purple;
-  outline: 0;
 
-  @include hover() {
+  a {
     color: $white;
   }
-}
 
-.skippy-text {
-  padding: .5em;
-  outline: 1px dotted;
+  &:focus-within a {
+    position: static !important;
+    width: auto !important;
+    height: auto !important;
+    padding: $spacer / 2 !important;
+    margin: $spacer / 4 !important;
+    overflow: visible !important;
+    clip: auto !important;
+    white-space: normal !important;
+  }
 }