Skip Links
This commit is contained in:
parent
c7f44aef04
commit
d33da95e34
5 changed files with 36 additions and 24 deletions
|
@ -1,28 +1,7 @@
|
||||||
/* ----------------------------- */
|
/* ----------------------------- */
|
||||||
/* ==Misc (skip links, hyphens) */
|
/* ==Misc */
|
||||||
/* ----------------------------- */
|
/* ----------------------------- */
|
||||||
|
|
||||||
/* styling skip links */
|
|
||||||
.#{$kna-namespace}skip-links {
|
|
||||||
position: absolute;
|
|
||||||
|
|
||||||
& a {
|
|
||||||
position: absolute;
|
|
||||||
overflow: hidden;
|
|
||||||
clip: rect(1px, 1px, 1px, 1px);
|
|
||||||
padding: 0.5em;
|
|
||||||
background: black;
|
|
||||||
color: white;
|
|
||||||
text-decoration: none;
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
position: static;
|
|
||||||
overflow: visible;
|
|
||||||
clip: auto;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// hyphens on tiny screens
|
// hyphens on tiny screens
|
||||||
@media (max-width: ($small - 1)) {
|
@media (max-width: ($small - 1)) {
|
||||||
/* you shall not pass */
|
/* you shall not pass */
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
/* Autogrid object */
|
/* ----------------------------- */
|
||||||
|
/* ==Autogrid object */
|
||||||
|
/* ----------------------------- */
|
||||||
/* see http://codepen.io/raphaelgoetter/pen/KMgBJd */
|
/* see http://codepen.io/raphaelgoetter/pen/KMgBJd */
|
||||||
|
|
||||||
@media (min-width: $small) {
|
@media (min-width: $small) {
|
||||||
[class^="autogrid"],
|
[class^="autogrid"],
|
||||||
[class*=" autogrid"] {
|
[class*=" autogrid"] {
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
/* Media object */
|
/* ----------------------------- */
|
||||||
|
/* ==Media object */
|
||||||
|
/* ----------------------------- */
|
||||||
/* see http://codepen.io/raphaelgoetter/pen/KMWWwj */
|
/* see http://codepen.io/raphaelgoetter/pen/KMWWwj */
|
||||||
|
|
||||||
@media (min-width: $small) {
|
@media (min-width: $small) {
|
||||||
.o-media {
|
.o-media {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
25
sass/components/skip-links.scss
Normal file
25
sass/components/skip-links.scss
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
/* ----------------------------- */
|
||||||
|
/* ==skip links */
|
||||||
|
/* ----------------------------- */
|
||||||
|
/* see https://www.alsacreations.com/article/lire/572-Les-liens-d-evitement.html */
|
||||||
|
|
||||||
|
/* styling skip links */
|
||||||
|
.#{$kna-namespace}skip-links {
|
||||||
|
position: absolute;
|
||||||
|
|
||||||
|
& a {
|
||||||
|
position: absolute;
|
||||||
|
overflow: hidden;
|
||||||
|
clip: rect(1px, 1px, 1px, 1px);
|
||||||
|
padding: 0.5em;
|
||||||
|
background: black;
|
||||||
|
color: white;
|
||||||
|
text-decoration: none;
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
position: static;
|
||||||
|
overflow: visible;
|
||||||
|
clip: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -21,6 +21,7 @@
|
||||||
3- Components :
|
3- Components :
|
||||||
- Media object
|
- Media object
|
||||||
- Autogrid object
|
- Autogrid object
|
||||||
|
- Skip Links
|
||||||
- Tables (data tables consistency)
|
- Tables (data tables consistency)
|
||||||
- Forms (forms consistency)
|
- Forms (forms consistency)
|
||||||
- Grillade (Grid System in Flexbox)
|
- Grillade (Grid System in Flexbox)
|
||||||
|
@ -48,6 +49,7 @@
|
||||||
// Components
|
// Components
|
||||||
@import "components/media.scss"; // media object
|
@import "components/media.scss"; // media object
|
||||||
@import "components/autogrid.scss"; // media autogrid
|
@import "components/autogrid.scss"; // media autogrid
|
||||||
|
@import "components/skip-links.scss"; // skip links
|
||||||
@import "components/tables.scss"; // data tables consistency
|
@import "components/tables.scss"; // data tables consistency
|
||||||
@import "components/forms.scss"; // forms consistency
|
@import "components/forms.scss"; // forms consistency
|
||||||
@import "components/grillade.scss"; // grids
|
@import "components/grillade.scss"; // grids
|
||||||
|
|
Loading…
Reference in a new issue