Skip to content

Commit

Permalink
Custom border-radius pour le thème BordeauxMetropole - DSFR 1.12 (#4469)
Browse files Browse the repository at this point in the history
* style: permet les border-radius sur les input-radio des thèmes iframe BordeauxMetropole & LightBLue

* fix: format

* style: force suppr. background-image du DSFR v1.12
  • Loading branch information
Shamzic authored Jul 17, 2024
1 parent 8c6bc63 commit 5c5e11e
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 10 deletions.
30 changes: 30 additions & 0 deletions src/styles/aides-jeunes.css
Original file line number Diff line number Diff line change
Expand Up @@ -587,3 +587,33 @@ textarea {
.fr-connect:before {
background-image: url(/public/img/logo-moncomptepro.svg);
}

/* Custom code for allow `border-radius` on input radio (prevent using current background-image class on DSFR version > 1.12.1) */
.fr-radio-rich input[type="radio"] + label {
background-image: none;
box-shadow: inset 0 0 0 1px var(--border-default-grey);
}

.fr-radio-rich input[type="radio"] + label:before {
box-shadow: inset 0 0 0 1px var(--border-action-high-grey),
inset 0 0 0 8px var(--background-default-grey),
inset 0 0 0 8px var(--background-action-high-blue-france);
height: 1rem;
left: 1.75rem;
margin-top: -0.5rem;
position: absolute;
top: 50%;
width: 1rem;
border-radius: 50%;
}

.fr-radio-rich input[type="radio"]:checked + label {
box-shadow: inset 0 0 0 1px var(--border-action-high-blue-france);
background-image: none;
}

.fr-radio-rich input[type="radio"]:checked + label:before {
box-shadow: inset 0 0 0 1px var(--border-action-high-grey),
inset 0 0 0 4px var(--background-default-grey),
inset 0 0 0 8px var(--background-action-high-blue-france);
}
5 changes: 0 additions & 5 deletions src/styles/themes/bordeaux-metropole.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,3 @@
--border-action-high-blue-france: #000000;
--border-active-blue-france: #000000;
}

/* border-radius unavailable on radio input (background-image forced by DSFR causing issue with the border) */
.fr-radio-rich {
--border-radius: none;
}
5 changes: 0 additions & 5 deletions src/styles/themes/light-blue.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,3 @@
/* Font */
--font-family: inherit;
}

/* border-radius unavailable on radio input (background-image forced by DSFR causing issue with the border) */
.fr-radio-rich {
--border-radius: none;
}

0 comments on commit 5c5e11e

Please sign in to comment.