boutons radio stylés
This commit is contained in:
parent
ddc20002ca
commit
c796838fde
5 changed files with 40 additions and 4 deletions
|
@ -1,11 +1,11 @@
|
||||||
# changelog v7.0.0beta (31 juillet 2017)
|
# changelog v7.0.0beta (1er août 2017)
|
||||||
- architecture globale revisitée (vendor, config, library, components)
|
- architecture globale revisitée (vendor, config, library, components)
|
||||||
- normalize.css v7.0.0
|
- normalize.css v7.0.0
|
||||||
- refonte complète des boutons, avec possibilités de variantes (primary, success, warning, etc.)
|
- refonte complète des boutons, avec possibilités de variantes (primary, success, warning, etc.)
|
||||||
- ajout des badges (tags), avec possibilités de variantes (primary, success, warning, etc.)
|
- ajout des badges (tags), avec possibilités de variantes (primary, success, warning, etc.)
|
||||||
- ajout des alertes, avec possibilités de variantes (primary, success, warning, etc.)
|
- ajout des alertes, avec possibilités de variantes (primary, success, warning, etc.)
|
||||||
- ajout d'un bouton de navigation .button-burger
|
- ajout d'un bouton de navigation .button-burger
|
||||||
- ajout des checkbox stylés
|
- ajout des checkbox et radio stylés
|
||||||
- refonte des styles de formulaires
|
- refonte des styles de formulaires
|
||||||
- autogrid object en Grid Layout
|
- autogrid object en Grid Layout
|
||||||
- regroupement des styles des tableaux
|
- regroupement des styles des tableaux
|
||||||
|
|
|
@ -2140,7 +2140,7 @@ button:focus {
|
||||||
/* ==Checkbox */
|
/* ==Checkbox */
|
||||||
/* ----------------------------- */
|
/* ----------------------------- */
|
||||||
/* use .checkbox class on input type=checkbox */
|
/* use .checkbox class on input type=checkbox */
|
||||||
/* recommanded HTML : <input type="checkbox" class="checkbox" id="test1"><label for="test1">click here</label> */
|
/* recommanded HTML : <input type="checkbox" class="checkbox" id="c1"><label for="c1">click here</label> */
|
||||||
.checkbox ~ label {
|
.checkbox ~ label {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/* ==Checkbox */
|
/* ==Checkbox */
|
||||||
/* ----------------------------- */
|
/* ----------------------------- */
|
||||||
/* use .checkbox class on input type=checkbox */
|
/* use .checkbox class on input type=checkbox */
|
||||||
/* recommanded HTML : <input type="checkbox" class="checkbox" id="test1"><label for="test1">click here</label> */
|
/* recommanded HTML : <input type="checkbox" class="checkbox" id="c1"><label for="c1">click here</label> */
|
||||||
|
|
||||||
.checkbox {
|
.checkbox {
|
||||||
@extend .visually-hidden;
|
@extend .visually-hidden;
|
||||||
|
|
34
sass/components/radio.scss
Normal file
34
sass/components/radio.scss
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
/* ----------------------------- */
|
||||||
|
/* ==Rdio */
|
||||||
|
/* ----------------------------- */
|
||||||
|
/* use .radio class on input type=radio */
|
||||||
|
/* recommanded HTML : <input type="radio" class="radio" name="radio" id="r1"><label for="r1">Click here</label> */
|
||||||
|
|
||||||
|
.radio {
|
||||||
|
@extend .visually-hidden;
|
||||||
|
|
||||||
|
& ~ label {
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
content: "";
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: baseline;
|
||||||
|
transform: translateY(.2rem);
|
||||||
|
margin-right: .5rem;
|
||||||
|
width: 1.1em; height: 1.1em;
|
||||||
|
border: 0;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 50%;
|
||||||
|
box-shadow: 0 0 0 2px $color-forms inset;
|
||||||
|
transition: .25s background;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&:checked ~ label:before {
|
||||||
|
background-image: radial-gradient(circle at center, #fff 30%, transparent 38%);
|
||||||
|
background-color: $color-forms;
|
||||||
|
background-position: center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
}
|
|
@ -25,6 +25,7 @@
|
||||||
- Forms (forms consistency)
|
- Forms (forms consistency)
|
||||||
- Buttons (buttons consistency)
|
- Buttons (buttons consistency)
|
||||||
- Checkbox (checkbox styles)
|
- Checkbox (checkbox styles)
|
||||||
|
- Radio (radio styles)
|
||||||
- Badges (badges consistency)
|
- Badges (badges consistency)
|
||||||
- Alerts (alerts consistency)
|
- Alerts (alerts consistency)
|
||||||
- Grillade (Grid System in Flexbox)
|
- Grillade (Grid System in Flexbox)
|
||||||
|
@ -56,6 +57,7 @@
|
||||||
@import "components/forms.scss"; // forms consistency and styles
|
@import "components/forms.scss"; // forms consistency and styles
|
||||||
@import "components/buttons.scss"; // buttons styles
|
@import "components/buttons.scss"; // buttons styles
|
||||||
@import "components/checkbox.scss"; // checkbox styles
|
@import "components/checkbox.scss"; // checkbox styles
|
||||||
|
@import "components/radio.scss"; // radio styles
|
||||||
@import "components/badges.scss"; // badges styles
|
@import "components/badges.scss"; // badges styles
|
||||||
@import "components/alerts.scss"; // alerts styles
|
@import "components/alerts.scss"; // alerts styles
|
||||||
@import "components/grillade.scss"; // grids
|
@import "components/grillade.scss"; // grids
|
||||||
|
|
Loading…
Reference in a new issue