From cffa8d0b69187dd4cf6e3665a5e2786213185fb7 Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Tue, 20 Sep 2022 17:33:12 +0200 Subject: [PATCH] style(dsfr/link): doc for explicitly disabling href underlined enabled by dsfr --- app/assets/stylesheets/dsfr.scss | 8 ++++++-- app/views/users/_procedure_footer.html.haml | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/dsfr.scss b/app/assets/stylesheets/dsfr.scss index f05de18fa..00e2f52c2 100644 --- a/app/assets/stylesheets/dsfr.scss +++ b/app/assets/stylesheets/dsfr.scss @@ -1,6 +1,10 @@ @import "colors"; -// override default text underline of dsfr -body [href]:not([class^="fr-"]):not(.fr-footer__bottom-copy *) { + +// Hacky override default text underline of DSFR because we don't want to underline links in our legacy UI. +// We don't match links having a dsfr class (prefixed by fr-). +// However DSFR components may contain links without fr- class on them, +// so these links can be artificially matched by adding any fr-class on them, (like fr-underlined) +body [href]:not([class^="fr-"]) { background-image: none; } diff --git a/app/views/users/_procedure_footer.html.haml b/app/views/users/_procedure_footer.html.haml index aa3959976..a1d8b1153 100644 --- a/app/views/users/_procedure_footer.html.haml +++ b/app/views/users/_procedure_footer.html.haml @@ -84,5 +84,5 @@ .fr-footer__bottom-copy %p Sauf mention contraire, tous les contenus de ce site sont sous - %a{ href: "https://github.com/etalab/licence-ouverte/blob/master/LO.md", target:"_blank" } licence etalab-2.0 + %a.fr-underlined{ href: "https://github.com/etalab/licence-ouverte/blob/master/LO.md", target:"_blank" } licence etalab-2.0 %br