From fb7ac3c610be2767e78611c28557d7254e6f9630 Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Fri, 11 Nov 2022 12:25:45 +0100 Subject: [PATCH 1/3] style(dsfr): convert a user button to DSFR --- app/views/shared/dossiers/_demande.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shared/dossiers/_demande.html.haml b/app/views/shared/dossiers/_demande.html.haml index b5c2cb127..6cba51a5e 100644 --- a/app/views/shared/dossiers/_demande.html.haml +++ b/app/views/shared/dossiers/_demande.html.haml @@ -30,7 +30,7 @@ - if profile == 'usager' && !dossier.read_only? .flex.row-reverse - = link_to t('views.shared.dossiers.demande.edit_identity'), identite_dossier_path(dossier), class: 'button' + = link_to t('views.shared.dossiers.demande.edit_identity'), identite_dossier_path(dossier), class: 'fr-btn fr-btn--tertiary' .tab-title= t('views.shared.dossiers.demande.form') - champs = dossier.champs_public.includes(:type_de_champ) From a208b2e1227fb80a50c4d8e5b79ac05574793c2c Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Fri, 11 Nov 2022 12:26:07 +0100 Subject: [PATCH 2/3] fix(dsfr): no underline on legacy buttons --- app/assets/stylesheets/buttons.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/app/assets/stylesheets/buttons.scss b/app/assets/stylesheets/buttons.scss index b95fe8ffa..1870a59f1 100644 --- a/app/assets/stylesheets/buttons.scss +++ b/app/assets/stylesheets/buttons.scss @@ -15,6 +15,7 @@ color: $black; text-align: center; -webkit-appearance: none; + background-image: none; // Remove DSFR underline &:hover:not(:disabled) { cursor: pointer; From 2359360c15eda51ac4092feeef34b0545687b2e0 Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Mon, 14 Nov 2022 10:10:29 +0100 Subject: [PATCH 3/3] fix(form): checkbox & radio not rendered properly on old safari & chrome --- app/assets/stylesheets/dsfr.scss | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/dsfr.scss b/app/assets/stylesheets/dsfr.scss index b96a48cac..23a5e6dea 100644 --- a/app/assets/stylesheets/dsfr.scss +++ b/app/assets/stylesheets/dsfr.scss @@ -13,16 +13,23 @@ select { font-weight: bold; } -// fix firefox < 80 not supporting "appearance: auto" on inputs +// 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. // scss-lint:disable DuplicateProperty input[type="checkbox"] { -moz-appearance: checkbox; -moz-appearance: auto; + + -webkit-appearance: checkbox; + -webkit-appearance: auto; } input[type="radio"] { -moz-appearance: radio; -moz-appearance: auto; + + -webkit-appearance: radio; + -webkit-appearance: auto; } // scss-lint:enable DuplicateProperty