-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/slide-toggleneeds investigationA member of the team needs to do further investigation to determine the root causeA member of the team needs to do further investigation to determine the root cause
Description
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
Steps to reproduce:
- Override styles for slider toogle not work:
/* Slider toggle */
$mat-primary-slider-toggle: (
main: $state_switch_on,
lighter: $state_switch_on,
darker: $state_switch_on,
200: $state_switch_on,
// For slide toggle,
contrast:
(
main: $light-primary-text,
lighter: $dark-primary-text,
darker: $light-primary-text
)
);
$theme-primary-slider-toggle: mat.define-palette($mat-primary-slider-toggle, main, lighter, darker);
$theme-accent-slider-toggle: mat.define-palette($mat-primary-slider-toggle, main, lighter, darker);
// The warn palette is optional (defaults to red).
$theme-warn-slider-toggle: mat.define-palette($mat-primary-slider-toggle, main, lighter, darker);
$slider-theme: mat.define-light-theme(
(
color: (
primary: $theme-primary-slider-toggle,
accent:$theme-accent-slider-toggle,
warn:$theme-warn-slider-toggle
)
)
);
@include mat.slide-toggle-theme($slider-theme);
But it works for button or all components:
https://stackblitz.com/edit/components-issue-jqjni4?file=src/app/example-component.html
@include mat.button-theme($slider-theme);
// or
@include mat.all-component-themes($slider-theme);
Reproduction
Steps to reproduce:
- Override styles for slider toogle not work:
Example here:
https://stackblitz.com/edit/components-issue-jqjni4?file=src/app/example-component.html
Expected Behavior
Override the styles for slider toggle
Actual Behavior
not override styles
Environment
- Angular:
- CDK/Material:
- Browser(s):
- Operating System (e.g. Windows, macOS, Ubuntu):
aastrouski, duskydrive, McGiogen, Edward-Alchikha, avante-hara and 16 more
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/slide-toggleneeds investigationA member of the team needs to do further investigation to determine the root causeA member of the team needs to do further investigation to determine the root cause