UNPKG

@codegouvfr/react-dsfr

Version:

French State Design System React integration library

83 lines (70 loc) 2.38 kB
/*! * DSFR v1.8.5 | SPDX-License-Identifier: MIT | License-Filename: LICENSE.md | restricted use (see terms and conditions) */ @charset "UTF-8"; /** * L'input de type checkbox avec son label est contenu dans un groupe * Ce groupe contient également les textes de validation, d'erreur et d'aide (optionnels) */ .fr-checkbox-group { /** * On cache l'input de type checkbox pour le styler via le label */ /** * Modificateur pour gérer l'état erreur */ /** * Modificateur pour gérer l'état validé */ } .fr-checkbox-group input[type=checkbox] { /** * On applique les styles au pseudo élément before du label quand l'input présente * un état check ou active */ /** * Mixins pour appliquer les styles correspondant au focus ainsi qu'à l'état disabled */ } @media (min-width: 36em) { /*! media sm */ } @media (min-width: 48em) { /*! media md */ } @media (min-width: 62em) { /*! media lg */ } @media (min-width: 78em) { /*! media xl */ } @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { .fr-checkbox-group input[type=checkbox] + label::before { box-shadow: inset 0 0 0 1px #161616; } .fr-checkbox-group input[type=checkbox]:checked + label::before, .fr-checkbox-group input[type=checkbox]:active:not(:disabled) + label::before { background-color: #000091; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M10 15.17l9.2-9.2 1.4 1.42L10 18l-6.36-6.36 1.4-1.42z'/%3E%3C/svg%3E"); } .fr-checkbox-group input[type=checkbox]:disabled + label::before { box-shadow: inset 0 0 0 1px #e5e5e5; } .fr-checkbox-group input[type=checkbox]:disabled:checked + label::before { color: #929292; background-color: #e5e5e5; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23929292' d='M10 15.17l9.2-9.2 1.4 1.42L10 18l-6.36-6.36 1.4-1.42z'/%3E%3C/svg%3E"); } .fr-checkbox-group--error input[type=checkbox] + label { color: #ce0500; } .fr-checkbox-group--error::before { box-shadow: inset 2px 0 0 0 #ce0500; } .fr-checkbox-group--valid input[type=checkbox] + label { color: #18753c; } .fr-checkbox-group--valid::before { box-shadow: inset 2px 0 0 0 #18753c; } }