Correct focus style and skip link
This commit is contained in:
parent
d1691066aa
commit
836136b98c
|
|
@ -1 +1 @@
|
||||||
<a href="#main-content">Main content</a>
|
<a href="#main-content" class="btn">Main content</a>
|
||||||
|
|
@ -4,6 +4,6 @@
|
||||||
outline-width: 2px;
|
outline-width: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
*:focus, *:focus-visible {
|
*:focus:focus-visible {
|
||||||
outline-style: solid;
|
outline-style: solid;
|
||||||
}
|
}
|
||||||
20
src/scss/components/_skip-link.scss
Normal file
20
src/scss/components/_skip-link.scss
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
body > a {
|
||||||
|
$link-offset: .3rem;
|
||||||
|
position: absolute;
|
||||||
|
inset-block-start: $link-offset;
|
||||||
|
inset-inline-start: $link-offset;
|
||||||
|
z-index: 99999;
|
||||||
|
padding: .4rem 1rem;
|
||||||
|
|
||||||
|
&:not(:focus) {
|
||||||
|
size: 1px;
|
||||||
|
margin: -1px;
|
||||||
|
padding: 0;
|
||||||
|
white-space: nowrap;
|
||||||
|
border: 0;
|
||||||
|
clip: rect(0 0 0 0);
|
||||||
|
clip-path: inset(50%);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
@use './components/utilities';
|
@use './components/utilities';
|
||||||
@use './components/focus';
|
@use './components/focus';
|
||||||
@use './components/button';
|
@use './components/button';
|
||||||
|
@use './components/skip-link';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue