Skip to content
This repository was archived by the owner on May 20, 2023. It is now read-only.

Commit 07c6307

Browse files
phantomessenshahan
authored andcommitted
Add new material mixin without selector argument.
PiperOrigin-RevId: 200752597
1 parent 41abfeb commit 07c6307

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

lib/material_radio/_mixins.scss

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
/// $primary-color: $mat-teal-500,
1010
/// $selector: '.custom-area');
1111
@mixin material-radio-theme($primary-color, $selector: '') {
12+
@warn 'This mixin is deprecated. Please use material-radio-color().';
13+
1214
::ng-deep #{$selector} material-radio.themeable:not(.disabled) {
1315
.icon-container.checked {
1416
.icon,
@@ -18,3 +20,25 @@
1820
}
1921
}
2022
}
23+
24+
/// Changes the color of the radio button.
25+
///
26+
/// Optional parameter $modifier is used for changing the color of certain
27+
/// material-radio components rather than all material-radio components.
28+
@mixin material-radio-color(
29+
$primary-color, $focus-indicator-color: $primary-color, $modifier: '') {
30+
::ng-deep material-radio#{$modifier}:not(.disabled) .icon-container {
31+
&.checked .icon {
32+
color: $primary-color;
33+
}
34+
35+
.ripple {
36+
color: $focus-indicator-color;
37+
}
38+
39+
&.focus::after {
40+
background-color: $focus-indicator-color;
41+
}
42+
}
43+
}
44+

0 commit comments

Comments
 (0)