Skip Links

This commit is contained in:
Raphael Goetter 2017-07-31 10:52:40 +02:00
parent c7f44aef04
commit d33da95e34
5 changed files with 36 additions and 24 deletions

View file

@ -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
@media (max-width: ($small - 1)) {
/* you shall not pass */

View file

@ -1,5 +1,8 @@
/* Autogrid object */
/* ----------------------------- */
/* ==Autogrid object */
/* ----------------------------- */
/* see http://codepen.io/raphaelgoetter/pen/KMgBJd */
@media (min-width: $small) {
[class^="autogrid"],
[class*=" autogrid"] {

View file

@ -1,5 +1,8 @@
/* Media object */
/* ----------------------------- */
/* ==Media object */
/* ----------------------------- */
/* see http://codepen.io/raphaelgoetter/pen/KMWWwj */
@media (min-width: $small) {
.o-media {
display: flex;

View 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;
}
}
}

View file

@ -21,6 +21,7 @@
3- Components :
- Media object
- Autogrid object
- Skip Links
- Tables (data tables consistency)
- Forms (forms consistency)
- Grillade (Grid System in Flexbox)
@ -48,6 +49,7 @@
// Components
@import "components/media.scss"; // media object
@import "components/autogrid.scss"; // media autogrid
@import "components/skip-links.scss"; // skip links
@import "components/tables.scss"; // data tables consistency
@import "components/forms.scss"; // forms consistency
@import "components/grillade.scss"; // grids