forked from twbs/bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(skippy): prevent skip links from overlapping header
- Loading branch information
Showing
2 changed files
with
22 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,20 @@ | ||
// stylelint-disable declaration-no-important | ||
|
||
.skippy { | ||
position: fixed; | ||
top: .5rem; | ||
left: .5rem; | ||
z-index: $zindex-fixed; | ||
padding: .5rem; | ||
color: $white; | ||
background-color: $bd-purple; | ||
|
||
&:hover { | ||
a { | ||
color: $white; | ||
} | ||
|
||
&: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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
<a class="skippy visually-hidden-focusable" href="#content">Skip to main content</a> | ||
<div class="skippy overflow-hidden"> | ||
<div class="container-xl"> | ||
<a class="visually-hidden-focusable d-inline-flex p-2 m-1" href="#content">Skip to main content</a> | ||
|
||
{{ if (eq .Page.Layout "docs") }} | ||
<a class="skippy visually-hidden-focusable d-none d-md-block" href="#bd-docs-nav">Skip to docs navigation</a> | ||
{{- end }} | ||
{{ if (eq .Page.Layout "docs") }} | ||
<a class="visually-hidden-focusable d-none d-md-inline-flex p-2 m-1" href="#bd-docs-nav">Skip to docs navigation</a> | ||
{{- end }} | ||
</div> | ||
</div> |