Hey! i wanna know if it's possible change the color of input radio whit external css file. or how know with sass downloading materialize which variable change
thanks for the help
hey! I already solved!
Thanks anyway!
What did you do? I cannot find a reliable way to switch checkbox colors.
[type="radio"].with-gap:checked + label:before {
border-radius: 50%;
border: 2px solid #0277bd; }
[type="radio"].with-gap:checked + label:after {
border-radius: 50%;
border: 2px solid #0277bd;
background-color: #0277bd;
z-index: 0;
-webkit-transform: scale(.5);
-moz-transform: scale(.5);
-ms-transform: scale(.5);
-o-transform: scale(.5);
transform: scale(.5); }
type="radio".with-gap:checked+label:before,
type="radio".with-gap:checked+label:after {
border: 2px solid black !important;
}
type="radio".with-gap:checked+label:after {
background-color: #424242 !important;
}
If you're using Less, you could use this mixin:
.radio-color(@border-color, @background-color: @border-color, @border-color-checked: @border-color) {
[type="radio"].with-gap {
&+label:before,
&+label:after {
border: 2px solid @border-color !important;
}
&:checked+label:before,
&:checked+label:after {
border: 2px solid @border-color-checked !important;
}
&:checked+label:after {
background-color: @background-color !important;
}
}
}
it does not work for me(all of them)
Most helpful comment
[type="radio"].with-gap:checked + label:before {
border-radius: 50%;
border: 2px solid #0277bd; }
[type="radio"].with-gap:checked + label:after {
border-radius: 50%;
border: 2px solid #0277bd;
background-color: #0277bd;
z-index: 0;
-webkit-transform: scale(.5);
-moz-transform: scale(.5);
-ms-transform: scale(.5);
-o-transform: scale(.5);
transform: scale(.5); }