-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ feat(radio): radio rich sans images & pictogram à la place d'img [D…
…S-1315] (#540) Les radios riches doivent utiliser des pictogrammes et non des images : - Retrait des images - Ajout de pictogramme Le snippet : ```html <div class="fr-radio-group fr-radio-rich"> <input value="1" type="radio" id="radio-rich-1" name="radio-rich"> <label class="fr-label" for="radio-rich-1"> Libellé bouton radio </label> <div class="fr-radio-rich__img"> <img src="../../../example/img/placeholder.1x1.png" alt="[À MODIFIER - vide ou texte alternatif de l’image]" /> </div> </div> ``` DEVIENT : ```html <div class="fr-radio-group fr-radio-rich"> <input value="1" type="radio" id="radio-rich-1" name="radio-rich"> <label class="fr-label" for="radio-rich-1"> Libellé bouton radio </label> <div class="fr-radio-rich__pictogram"> <svg aria-hidden="true" class="fr-artwork" viewBox="0 0 80 80" width="80px" height="80px"> <use class="fr-artwork-decorative" href="../../../dist/artwork/pictograms/buildings/city-hall.svg#artwork-decorative"></use> <use class="fr-artwork-minor" href="../../../dist/artwork/pictograms/buildings/city-hall.svg#artwork-minor"></use> <use class="fr-artwork-major" href="../../../dist/artwork/pictograms/buildings/city-hall.svg#artwork-major"></use> </svg> </div> </div> ``` Remplacer buildings/city-hall par la catégorie et le nom du pictogramme désiré BREAKING CHANGE : `fr-radio-rich__img` devient `fr-radio-rich__pictogram`
- Loading branch information
Showing
17 changed files
with
163 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
//// | ||
/// Radio Scheme : radio rich | ||
/// @group radio | ||
//// | ||
|
||
@use 'module/color'; | ||
@use 'module/disabled'; | ||
@use 'module/selector'; | ||
|
||
// img devient pictogram | ||
@mixin _radio-scheme-deprecated($legacy: false) { | ||
#{ns(radio-rich)} { | ||
&__img { | ||
@include color.background-image((border default grey) (border default grey) (border default grey) (border default grey), (legacy: $legacy)); | ||
@include color.background((background default grey), (legacy: $legacy)); | ||
} | ||
|
||
input[type="radio"] { | ||
@include disabled.selector { | ||
~ #{selector.ns(radio-rich__img)} { | ||
svg * { | ||
@include color.fill(text disabled grey, (legacy: $legacy)); | ||
} | ||
} | ||
} | ||
|
||
&:checked { | ||
~ #{ns(radio-rich__img)} { | ||
@include color.background-image((action-high blue-france) (action-high blue-france) (action-high blue-france) (border default grey) , (legacy: $legacy)); | ||
} | ||
|
||
@include disabled.selector { | ||
~ #{ns(radio-rich__img)} { | ||
@include color.background-image((text disabled grey) (text disabled grey) (text disabled grey) (border default grey), (legacy: $legacy)); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.