File "utils.css"
Full path: /home/argothem/www/organecyberpresse/prive/themes/spip/utils.css
File size: 2.29 KB
MIME-type: text/plain
Charset: utf-8
/* Éléments flottants */
.float-start {
float: inline-start;
}
.float-end {
float: inline-end;
}
/**
* Éléments positionnés en sticky
*
* .sticky tout court est équivalent à .sticky-top
* Par défaut l'élément est collé au parent, pour avoir un espacement,
* ajouter .sticky-m-<taille> (m = marge, taille = de 1 à 3).
*
* La parent doit avoir un taille supérieure sinon aucun effet.
* Il ne doit pas y avoir un ancêtre avec une règle overflow: hidden|auto
*/
:root {
--spip-sticky-spacing-x: 0;
--spip-sticky-spacing-y: 0;
}
.sticky,
.sticky-top,
.sticky-bottom,
.sticky-start,
.sticky-end {
position: sticky !important; /* classe utilitaire = forcer */
z-index: 10; /* doit passer par dessus les autres éléments */
}
.sticky,
.sticky-top {
top: var(--spip-sticky-spacing-y);
}
.sticky-bottom {
bottom: var(--spip-sticky-spacing-y);
}
.sticky-start {
inset-inline-start: var(--spip-sticky-spacing-x);
}
.sticky-end {
inset-inline-end: var(--spip-sticky-spacing-x);
}
/* Classes à ajouter en plus pour avoir un espacement */
.sticky-m-1 {
--spip-sticky-spacing-x: var(--spip-spacing-x);
--spip-sticky-spacing-y: var(--spip-spacing-y);
}
.sticky-m-2 {
--spip-sticky-spacing-x: calc(var(--spip-spacing-x) * 2);
--spip-sticky-spacing-y: calc(var(--spip-spacing-y) * 2);
}
.sticky-m-3 {
--spip-sticky-spacing-x: calc(var(--spip-spacing-x) * 3);
--spip-sticky-spacing-y: calc(var(--spip-spacing-y) * 3);
}
/**
* Tableaux : éléments <th> en sticky
*
* Par commodité, on peut placer une classe sur une ligne <tr> entière plutôt que sur chaque cellule.
* Les cellules doivent avoir un fond de couleur pour un rendu correct.
*/
/* Sticky vertical dans thead ou tbody */
table tr.row-sticky-top th:not([class*=sticky]) {
position: sticky !important;
top: 0;
z-index: 10;
}
/* Sticky horizontal dans tbody uniquement
* En cas de double emploi horizontal dans tbody + vertical dans thead,
* il faut aussi mettre les classes .sticky-start.sticky-top sur la cellule concernée dans le thead
*/
table tbody tr.row-sticky-start th:not([class*=sticky]) {
position: sticky !important;
inset-inline-start: 0;
top: initial;
z-index: 9; /* Passer sous les lignes du thead qui seraient aussi en sticky */
}
table thead tr.row-sticky-top th[class*=sticky] {
z-index: 11; /* Par dessus tout le reste */
}