/*! * DSFR v1.11.2 | SPDX-License-Identifier: MIT | License-Filename: LICENSE.md | restricted use (see terms and conditions) */ @charset "UTF-8"; /* ¯¯¯¯¯¯¯¯¯ *\ TOGGLE \* ˍˍˍˍˍˍˍˍˍ */ .fr-toggle { display: flex; flex-wrap: wrap; position: relative; padding: 1rem 0; --text-spacing: 0; --title-spacing: 0; } .fr-toggle input[type=checkbox] { width: 2.5rem; height: 1.5rem; position: absolute; opacity: 0; box-shadow: inset 0 0 0 1px var(--border-action-high-blue-france); } .fr-toggle input[type=checkbox]:checked ~ .fr-toggle__label[data-fr-unchecked-label][data-fr-checked-label]::before { content: attr(data-fr-checked-label); } .fr-toggle input[type=checkbox]:checked ~ .fr-toggle__label::after { transform: translateX(1rem); --data-uri-svg: url("data:image/svg+xml;charset=utf-8,"); background-image: var(--data-uri-svg); } .fr-toggle label { --toggle-status-width: auto; display: inline-flex; width: calc(100% - 2rem); min-height: 1.5rem; font-size: 1rem; line-height: 1.5rem; color: var(--text-label-grey); } .fr-toggle label[data-fr-unchecked-label][data-fr-checked-label] { padding-left: 0; } .fr-toggle label[data-fr-unchecked-label][data-fr-checked-label]::before { content: attr(data-fr-unchecked-label); margin-right: calc(var(--toggle-status-width) - 0.5rem); margin-bottom: 1rem; } .fr-toggle label[data-fr-unchecked-label][data-fr-checked-label] + .fr-hint-text { margin-top: 0.5rem; } .fr-toggle label::before { content: ""; display: block; flex-shrink: 0; height: calc(1.25rem + 1px); padding-top: 1.75rem; font-size: 0.75rem; line-height: 1.25rem; border-radius: 0.75rem; margin-right: 2rem; min-width: 2.5rem; max-width: 2.5rem; background-repeat: no-repeat; color: var(--text-active-blue-france); --data-uri-svg: url("data:image/svg+xml;charset=utf-8,"); background-image: var(--data-uri-svg); } .fr-toggle label::after { content: ""; display: flex; align-items: center; justify-content: center; position: absolute; top: 1rem; left: 0; width: 1.5rem; height: 1.5rem; border-radius: 50%; background-repeat: no-repeat; background-size: 1rem; background-position: center; color: var(--text-active-blue-france); box-shadow: inset 0 0 0 1px var(--border-action-high-blue-france); background-color: var(--background-default-grey); --idle: transparent; --hover: var(--background-default-grey-hover); --active: var(--background-default-grey-active); } .fr-toggle .fr-hint-text { display: block; margin-top: 1rem; margin-bottom: 0; font-size: 0.75rem; line-height: 1.25rem; flex-basis: 100%; color: var(--text-mention-grey); } .fr-toggle--label-left .fr-toggle__input { order: 1; margin: 0 0 0 auto; } .fr-toggle--label-left .fr-toggle__input + label[data-fr-checked-label]::before { margin-right: 0; margin-left: calc(var(--toggle-status-width) - 0.5rem); } .fr-toggle--label-left .fr-toggle__label { justify-content: space-between; padding-left: 0; width: calc(100% - 2rem); flex: 1; } .fr-toggle--label-left .fr-toggle__label::before { flex-shrink: 0; order: 1; margin-left: 1rem; margin-right: 0; text-align: right; direction: rtl; } .fr-toggle--label-left .fr-toggle__label::after { left: auto; right: 1rem; } .fr-toggle--label-left .fr-hint-text { order: 2; } .fr-toggle__list { --ul-type: none; --ol-type: none; --ul-start: 0; --ol-start: 0; --xl-block: 0; --li-bottom: 0; --ol-content: none; } .fr-fieldset .fr-toggle__list li:first-child .fr-toggle { padding-top: 0; } .fr-fieldset .fr-toggle__list li:first-child .fr-toggle label::after { top: 0; } :root[data-fr-theme=dark] .fr-toggle label::before { --data-uri-svg: url("data:image/svg+xml;charset=utf-8,"); } .fr-toggle input[type=checkbox]:checked { background-color: var(--background-active-blue-france); --idle: transparent; --hover: var(--background-active-blue-france-hover); --active: var(--background-active-blue-france-active); } .fr-toggle input[type=checkbox]:checked ~ .fr-toggle__label::before { --data-uri-svg: url("data:image/svg+xml;charset=utf-8,"); background-image: var(--data-uri-svg); } :root[data-fr-theme=dark] .fr-toggle input[type=checkbox]:checked ~ .fr-toggle__label::before { --data-uri-svg: url("data:image/svg+xml;charset=utf-8,"); } :root[data-fr-theme=dark] .fr-toggle input[type=checkbox]:checked ~ .fr-toggle__label::after { --data-uri-svg: url("data:image/svg+xml;charset=utf-8,"); } .fr-toggle input[type=checkbox]:disabled { box-shadow: inset 0 0 0 1px var(--border-disabled-grey); } .fr-toggle input[type=checkbox]:disabled:checked { background-color: var(--background-disabled-grey); --idle: transparent; --hover: var(--background-disabled-grey-hover); --active: var(--background-disabled-grey-active); } .fr-toggle input[type=checkbox]:disabled:checked ~ .fr-toggle__label::before { --data-uri-svg: url("data:image/svg+xml;charset=utf-8,"); background-image: var(--data-uri-svg); } :root[data-fr-theme=dark] .fr-toggle input[type=checkbox]:disabled:checked ~ .fr-toggle__label::before { --data-uri-svg: url("data:image/svg+xml;charset=utf-8,"); } .fr-toggle input[type=checkbox]:disabled:checked ~ .fr-toggle__label::after { --data-uri-svg: url("data:image/svg+xml;charset=utf-8,"); background-image: var(--data-uri-svg); } :root[data-fr-theme=dark] .fr-toggle input[type=checkbox]:disabled:checked ~ .fr-toggle__label::after { --data-uri-svg: url("data:image/svg+xml;charset=utf-8,"); } .fr-toggle input[type=checkbox]:disabled ~ .fr-toggle__label::before { color: var(--text-disabled-grey); --data-uri-svg: url("data:image/svg+xml;charset=utf-8,"); background-image: var(--data-uri-svg); } :root[data-fr-theme=dark] .fr-toggle input[type=checkbox]:disabled ~ .fr-toggle__label::before { --data-uri-svg: url("data:image/svg+xml;charset=utf-8,"); } .fr-toggle input[type=checkbox]:disabled ~ .fr-toggle__label::after { color: var(--text-disabled-grey); box-shadow: inset 0 0 0 1px var(--border-disabled-grey); } .fr-toggle--border-bottom { box-shadow: inset 0 -1px 0 0 var(--border-default-grey); } .fr-toggle--error label, .fr-fieldset--error .fr-toggle label { color: var(--text-default-error); } .fr-toggle--error label::before, .fr-fieldset--error .fr-toggle label::before { color: var(--text-default-error); --data-uri-svg: url("data:image/svg+xml;charset=utf-8,"); background-image: var(--data-uri-svg); } :root[data-fr-theme=dark] .fr-toggle--error label::before, :root[data-fr-theme=dark] .fr-fieldset--error .fr-toggle label::before { --data-uri-svg: url("data:image/svg+xml;charset=utf-8,"); } .fr-toggle--error label::after, .fr-fieldset--error .fr-toggle label::after { box-shadow: inset 0 0 0 1px var(--border-plain-error); } .fr-toggle--error input[type=checkbox]:checked ~ .fr-toggle__label::before, .fr-fieldset--error .fr-toggle input[type=checkbox]:checked ~ .fr-toggle__label::before { --data-uri-svg: url("data:image/svg+xml;charset=utf-8,"); background-image: var(--data-uri-svg); } :root[data-fr-theme=dark] .fr-toggle--error input[type=checkbox]:checked ~ .fr-toggle__label::before, :root[data-fr-theme=dark] .fr-fieldset--error .fr-toggle input[type=checkbox]:checked ~ .fr-toggle__label::before { --data-uri-svg: url("data:image/svg+xml;charset=utf-8,"); } .fr-toggle--valid label, .fr-fieldset--valid .fr-toggle label { color: var(--text-default-success); } .fr-toggle--valid label::before, .fr-fieldset--valid .fr-toggle label::before { color: var(--text-default-success); --data-uri-svg: url("data:image/svg+xml;charset=utf-8,"); background-image: var(--data-uri-svg); } :root[data-fr-theme=dark] .fr-toggle--valid label::before, :root[data-fr-theme=dark] .fr-fieldset--valid .fr-toggle label::before { --data-uri-svg: url("data:image/svg+xml;charset=utf-8,"); } .fr-toggle--valid label::after, .fr-fieldset--valid .fr-toggle label::after { box-shadow: inset 0 0 0 1px var(--border-plain-success); } .fr-toggle--valid input[type=checkbox]:checked ~ .fr-toggle__label::before, .fr-fieldset--valid .fr-toggle input[type=checkbox]:checked ~ .fr-toggle__label::before { --data-uri-svg: url("data:image/svg+xml;charset=utf-8,"); background-image: var(--data-uri-svg); } :root[data-fr-theme=dark] .fr-toggle--valid input[type=checkbox]:checked ~ .fr-toggle__label::before, :root[data-fr-theme=dark] .fr-fieldset--valid .fr-toggle input[type=checkbox]:checked ~ .fr-toggle__label::before { --data-uri-svg: url("data:image/svg+xml;charset=utf-8,"); } @media (min-width: 36em) { /*! media sm */ } @media (min-width: 48em) { /*! media md */ } @media (min-width: 62em) { /*! media lg */ } @media (min-width: 78em) { /*! media xl */ }