Skip to content

Commit

Permalink
Make checkmark color match text color
Browse files Browse the repository at this point in the history
  • Loading branch information
amysorto committed Feb 27, 2024
1 parent d64545f commit 89aaace
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/material/button-toggle/button-toggle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ $_standard-tokens: (
@include token-utils.use-tokens($_standard-tokens...) {
@include token-utils.create-token-slot(border-radius, shape);
border: solid 1px var(#{token-utils.get-token-variable(divider-color)});

.mat-pseudo-checkbox {
--mat-minimal-pseudo-checkbox-selected-checkmark-color: var(
#{token-utils.get-token-variable(selected-state-text-color)}
);
}
}

&:not([class*='mat-elevation-z']) {
Expand Down Expand Up @@ -86,6 +92,10 @@ $_standard-tokens: (
@include token-utils.create-token-slot(font-weight, label-text-weight);
@include token-utils.create-token-slot(letter-spacing, label-text-tracking);

--mat-minimal-pseudo-checkbox-selected-checkmark-color: var(
#{token-utils.get-token-variable(selected-state-text-color)}
);

&.cdk-keyboard-focused .mat-button-toggle-focus-overlay {
@include token-utils.create-token-slot(opacity, focus-state-layer-opacity);
}
Expand Down Expand Up @@ -116,6 +126,9 @@ $_standard-tokens: (
@include token-utils.use-tokens($_legacy-tokens...) {
@include token-utils.create-token-slot(color, disabled-state-text-color);
@include token-utils.create-token-slot(background-color, disabled-state-background-color);
--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: var(
#{token-utils.get-token-variable(disabled-state-text-color)}
);

&.mat-button-toggle-checked {
@include token-utils.create-token-slot(background-color,
Expand Down Expand Up @@ -159,6 +172,12 @@ $_standard-tokens: (
@include token-utils.create-token-slot(color, disabled-state-text-color);
@include token-utils.create-token-slot(background-color, disabled-state-background-color);

.mat-pseudo-checkbox {
--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: var(
#{token-utils.get-token-variable(disabled-selected-state-text-color)}
);
}

&.mat-button-toggle-checked {
@include token-utils.create-token-slot(color, disabled-selected-state-text-color);
@include token-utils.create-token-slot(background-color,
Expand Down

0 comments on commit 89aaace

Please sign in to comment.