2024-11-05 19:02:31 +01:00
@import ' colors ' ;
2022-09-20 17:33:12 +02:00
2023-07-27 05:37:27 +02:00
// overwrite DSFR style for SimpleFormatComponent, some user use markdown with
// ordered list having paragraph between list item
2023-07-27 14:29:13 +02:00
ol . fr-ol-content--override {
2023-07-27 05:37:27 +02:00
list-style-type : decimal ;
li : : marker {
content : inherit ;
}
}
2022-09-01 16:29:39 +02:00
// with Marianne font, weight of font is less bolder, so bold it up
. button . primary {
font-weight : bold ;
}
2022-09-07 19:00:56 +02:00
2022-12-22 12:47:17 +01:00
trix-editor . fr-input {
max-height : none ;
}
2024-02-23 14:05:12 +01:00
. fr-header {
. fr-notice {
// get back link underlined in notices, because they are usually hidden in headers
--underline-img : linear-gradient ( 0 deg , currentColor , currentColor ) ;
}
2023-10-30 11:20:04 +01:00
}
2024-02-23 14:05:12 +01:00
. fr-label + . fr-ds-combobox {
// same as .fr-label + .fr-input
margin-top : 0 .5 rem ;
}
2023-11-13 10:14:02 +01:00
. fr-ds-combobox {
2024-05-06 18:08:26 +02:00
. fr-autocomplete {
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 d='M18.031 16.6168L22.3137 20.8995L20.8995 22.3137L16.6168 18.031C15.0769 19.263 13.124 20 11 20C6.032 20 2 15.968 2 11C2 6.032 6.032 2 11 2C15.968 2 20 6.032 20 11C20 13.124 19.263 15.0769 18.031 16.6168ZM16.0247 15.8748C17.2475 14.6146 18 12.8956 18 11C18 7.1325 14.8675 4 11 4C7.1325 4 4 7.1325 4 11C4 14.8675 7.1325 18 11 18C12.8956 18 14.6146 17.2475 15.8748 16.0247L16.0247 15.8748Z'%3E%3C/path%3E%3C/svg%3E" ) ;
}
}
2024-05-15 23:17:24 +02:00
. fr-ds-combobox__multiple {
. fr-tag-list {
display : flex ;
flex-wrap : wrap ;
gap : 0 .3 rem ;
2024-10-11 10:29:48 +02:00
margin-bottom : 0 .5 rem ;
2024-05-15 23:17:24 +02:00
}
}
2024-05-06 18:08:26 +02:00
. fr-ds-combobox__menu {
2024-11-05 19:02:31 +01:00
& [ data-placement = ' top ' ] {
2024-05-06 18:08:26 +02:00
--origin : translateY ( 8 px ) ;
}
2024-11-05 19:02:31 +01:00
& [ data-placement = ' bottom ' ] {
2024-05-06 18:08:26 +02:00
--origin : translateY ( - 8 px ) ;
}
2024-11-05 19:02:31 +01:00
& [ data-placement = ' right ' ] {
2024-05-06 18:08:26 +02:00
--origin : translateX ( - 8 px ) ;
}
2024-11-05 19:02:31 +01:00
& [ data-placement = ' left ' ] {
2024-05-06 18:08:26 +02:00
--origin : translateX ( 8 px ) ;
}
& [ data-entering ] {
animation : popover-slide 200 ms ;
}
& . fr-menu {
width : var ( -- trigger-width ) ;
top : unset ;
2023-11-13 10:14:02 +01:00
. fr-menu__list {
2024-05-06 18:08:26 +02:00
display : block ;
width : unset ;
2024-04-08 10:22:23 +02:00
max-height : 300 px ;
2024-05-06 18:08:26 +02:00
overflow : auto ;
}
. fr-menu__item {
& [ data-selected ] {
font-weight : bold ;
}
& [ data-focused ] {
font-weight : bold ;
}
2023-11-13 10:01:50 +01:00
}
}
2024-05-06 18:08:26 +02:00
}
2023-12-13 16:14:37 +01:00
2024-05-06 18:08:26 +02:00
@keyframes popover-slide {
from {
transform : var ( -- or igin ) ;
opacity : 0 ;
}
to {
transform : translateY ( 0 ) ;
opacity : 1 ;
2023-12-12 09:49:38 +01:00
}
2023-11-13 10:01:50 +01:00
}
2023-11-13 10:14:02 +01:00
@media ( max-width : 62 em ) {
2024-05-06 18:08:26 +02:00
. fr-ds-combobox__menu {
& . fr-menu . fr-menu__list {
z-index : calc ( var ( -- ground ) + 1000 ) ;
background-color : var ( -- background-default-grey ) ;
--idle : transparent ;
--hover : var ( -- background-overlap-grey-hover ) ;
--active : var ( -- background-overlap-grey-active ) ;
filter : drop-shadow ( var ( -- overlap-shadow )) ;
box-shadow : inset 0 1 px 0 0 var ( -- border-open-blue-france ) ;
}
2023-11-13 10:14:02 +01:00
}
}
2022-11-14 10:10:29 +01:00
// Fix firefox < 80, Safari < 15.4, Chrome < 83 not supporting "appearance: auto" on inputs
// This rule was set by DSFR for DSFR design, but broke our legacy forms.
2024-11-05 19:02:31 +01:00
input [ type = ' checkbox ' ] {
2022-09-07 19:00:56 +02:00
-moz-appearance : checkbox ;
-moz-appearance : auto ;
2022-11-14 10:10:29 +01:00
-webkit-appearance : checkbox ;
-webkit-appearance : auto ;
2022-09-07 19:00:56 +02:00
}
2024-11-05 19:02:31 +01:00
input [ type = ' radio ' ] {
2022-09-07 19:00:56 +02:00
-moz-appearance : radio ;
-moz-appearance : auto ;
2022-11-14 10:10:29 +01:00
-webkit-appearance : radio ;
-webkit-appearance : auto ;
2022-09-07 19:00:56 +02:00
}
2022-09-09 12:07:10 +02:00
2023-05-02 19:07:53 +02:00
// remove additional calendar icon on date input already handle by Firefox navigator
@-moz-document url-prefix ( ) {
2024-11-05 19:02:31 +01:00
. fr-input [ type = ' date ' ] {
2023-05-02 19:07:53 +02:00
background-image : none ;
}
2023-04-28 15:28:04 +02:00
}
2024-11-05 19:02:31 +01:00
. fr-btn . fr-btn--icon-left [ target = ' _blank ' ] {
2022-11-30 09:56:32 +01:00
& : : after {
display : none ;
}
}
2022-12-02 17:16:29 +01:00
2023-02-27 17:49:48 +01:00
// dans le DSFR il est possible d'avoir un bouton seulement avec une icone mais j'ai du surcharger ici pour eviter d'avoir des marges de l'icone. Je n'ai pas bien compris pourquoi
2024-11-05 19:02:31 +01:00
. fr-btns-group--sm . fr-btns-group--icon-right
. fr-btn [ class * = ' fr-icon- ' ] . icon-only : : after {
2023-02-14 17:57:50 +01:00
margin-left : 0 ;
margin-right : 0 ;
}
2023-02-23 10:56:33 +01:00
. fr-btn . fr-btn--secondary . danger {
color : $light-red ;
box-shadow : 0 px 0 px 0 px 1 px $light-red ;
}
2023-05-02 19:07:53 +02:00
// on utilise le dropdown de sélecteur de langue pour un autre usage donc on veut retirer l'icone
. fr-translate . fr-translate__btn . custom-fr-translate-no-icon : : before {
display : none ;
}
2023-07-13 10:38:15 +02:00
// on souhaite que le dropdown s'adapate correctement en largeur
. fr-translate . fr-menu__list . max-content {
width : max-content ;
}
2024-06-21 11:27:44 +02:00
// on applique le comportement desktop du sélecteur de langue aux terminaux de toute dimension
. fr-translate . fr-menu__list {
display : grid ;
grid-template-rows : repeat ( var ( -- rows ) , auto ) ;
grid-auto-flow : column ;
}
2024-11-05 19:02:31 +01:00
. fr-translate__language [ aria-current ] : not ( [ aria-current = ' false ' ] ) {
2024-06-21 11:27:44 +02:00
display : inline-flex ;
}
2024-01-04 16:20:27 +01:00
// on veut ajouter un gris plus clair dans le side_menu
. fr-sidemenu__item . fr-sidemenu__link . custom-link-grey {
color : var ( -- text - disabled-grey ) ;
}
2023-05-02 19:07:53 +02:00
// on veut ferrer à droite le dropdown de sélecteur de langue
@media ( min-width : 62 em ) {
. fr-nav__item . custom-fr-translate-flex-end {
align-items : flex-end ;
}
}
2023-11-27 15:47:43 +01:00
// improve readability in Windows High Contrast Mode
@media screen and ( forced-colors : active ) {
. fr-input ,
. fr-select ,
. fr-btn {
border : 2 px solid var ( -- border-action-high-grey ) ;
}
2024-11-05 19:02:31 +01:00
. fr-radio-group input [ type = ' radio ' ] {
2023-11-27 15:47:43 +01:00
opacity : 1 ;
}
2024-11-05 19:02:31 +01:00
. fr-tabs__tab [ aria-selected = ' true ' ] : not ( : disabled ) {
2023-11-27 15:47:43 +01:00
border : 5 px solid var ( -- border-action-high-grey ) ;
}
. fr-tabs__tab {
border : 2 px solid var ( -- border-action-high-grey ) ;
}
}
2024-05-03 14:54:46 +02:00
// On restaure la visibilité des éléments .fr-search-bar .fr-label (en appliquant les valeurs par défaut des différentes propriétés)
// Et on utilise la classe .sr-only pour masquer les éléments souhaités au cas par cas
. fr-search-bar . fr-label {
position : initial ;
width : initial ;
height : initial ;
padding : initial ;
margin : initial ;
overflow : initial ;
clip : initial ;
white-space : initial ;
border : initial ;
display : block ; // Pour cette valeur spécifique, on récupère celle de .fr-label
}
2024-05-23 11:38:27 +02:00
2024-09-17 15:01:01 +02:00
// We use the DSFR badge design to highlight the email in France Connect page
// but we don't want it to be uppercase
. fr-badge--lowercase {
text-transform : lowercase ;
}
2024-10-01 15:17:09 +02:00
2024-11-05 18:23:14 +01:00
// Caption is bold, but all-procedures table use fr-tag in caption
. fr-table caption . fr-tag {
font-weight : normal ;
}
2024-10-14 18:07:01 +02:00
// We remove the line height because it creates unharmonized spaces - most of all in table
. fr-tags-group > li {
line-height : inherit ;
}
2024-11-13 18:40:09 +01:00
. fr-cell--numeric {
font-variant-numeric : tabular-nums ;
}
2024-11-25 14:52:31 +01:00
// We don't want badge to split in two lines
. fr-tag . no-wrap {
white-space : nowrap ;
}