134 lines
2.6 KiB
SCSS
134 lines
2.6 KiB
SCSS
|
/*
|
||
|
* Hide visually and from screen readers:
|
||
|
*/
|
||
|
.hidden {
|
||
|
display: none !important;
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
* Hide only visually, but have it available for screen readers:
|
||
|
* https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
|
||
|
*
|
||
|
* 1. For long content, line feeds are not interpreted as spaces and small width
|
||
|
* causes content to wrap 1 word per line:
|
||
|
* https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
|
||
|
*/
|
||
|
|
||
|
.visuallyhidden {
|
||
|
border: 0;
|
||
|
clip: rect(0 0 0 0);
|
||
|
clip-path: inset(50%);
|
||
|
height: 1px;
|
||
|
margin: 0;
|
||
|
overflow: hidden;
|
||
|
padding: 0;
|
||
|
position: absolute;
|
||
|
width: 1px;
|
||
|
white-space: nowrap; /* 1 */
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
* Extends the .visuallyhidden class to allow the element
|
||
|
* to be focusable when navigated to via the keyboard:
|
||
|
* https://www.drupal.org/node/897638
|
||
|
*/
|
||
|
|
||
|
.visuallyhidden.focusable:active,
|
||
|
.visuallyhidden.focusable:focus {
|
||
|
clip: auto;
|
||
|
clip-path: none;
|
||
|
height: auto;
|
||
|
margin: 0;
|
||
|
overflow: visible;
|
||
|
position: static;
|
||
|
width: auto;
|
||
|
white-space: inherit;
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
* Hide visually and from screen readers, but maintain layout
|
||
|
*/
|
||
|
.invisible {
|
||
|
visibility: hidden;
|
||
|
height:0; margin:0; padding:0;
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
masqué dans un navigateur mais lisible par un lecteur d'ecran
|
||
|
uniquement si javascript actif
|
||
|
*/
|
||
|
.js {
|
||
|
.js-visuallyhidden {
|
||
|
border: 0;
|
||
|
clip: rect(0 0 0 0);
|
||
|
height: 1px;
|
||
|
margin: -1px;
|
||
|
overflow: hidden;
|
||
|
padding: 0;
|
||
|
position: absolute;
|
||
|
width: 1px;
|
||
|
}
|
||
|
.js-hidden {
|
||
|
display: none;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
tout le temps affiche sauf si javascript actif
|
||
|
*/
|
||
|
.no-js .nojs-visuallyhidden {
|
||
|
display: none;
|
||
|
visibility: hidden;
|
||
|
border: 0;
|
||
|
clip: rect(0 0 0 0);
|
||
|
height: 1px;
|
||
|
margin: -1px;
|
||
|
overflow: hidden;
|
||
|
padding: 0;
|
||
|
position: absolute;
|
||
|
width: 1px;
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
* Clearfix: contain floats
|
||
|
*
|
||
|
* For modern browsers
|
||
|
* 1. The space content is one way to avoid an Opera bug when the
|
||
|
* `contenteditable` attribute is included anywhere else in the document.
|
||
|
* Otherwise it causes space to appear at the top and bottom of elements
|
||
|
* that receive the `clearfix` class.
|
||
|
* 2. The use of `table` rather than `block` is only necessary if using
|
||
|
* `:before` to contain the top-margins of child elements.
|
||
|
*/
|
||
|
.clearfix:before,
|
||
|
.clearfix:after {
|
||
|
content: " "; /* 1 */
|
||
|
display: table; /* 2 */
|
||
|
}
|
||
|
|
||
|
.clearfix:after {
|
||
|
clear: both;
|
||
|
}
|
||
|
|
||
|
.nettoyeur {
|
||
|
@extend .clearfix;
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
* Faire un lien sur un bloc entier
|
||
|
*/
|
||
|
.block-link-parent {
|
||
|
position: relative;
|
||
|
.block-link {
|
||
|
//position: inherit;
|
||
|
&:before {
|
||
|
content: "";
|
||
|
position: absolute;
|
||
|
bottom: 0;
|
||
|
left: 0;
|
||
|
right: 0;
|
||
|
top: 0;
|
||
|
}
|
||
|
}
|
||
|
}
|