Skip to content

MdSlider doesn't work with dark themes #4249

@M4R1KU

Description

@M4R1KU

Bug, feature request, or proposal:

Bug

What is the expected behavior?

If I use multiple themes I expect it that the accent color should change if I change the theme like other components do, for instance the md-raised-button.

What is the current behavior?

The accent color does not change even if the special color is specified.

AFAIK this issue only exists since the beta.3 release.

What are the steps to reproduce?

I just took the example code from the "Multiple themes"-Guide an tried it with a md-slider.
The toggleTheme function controls a HostBinding which controls the .unicorn-dark-theme class.

@import '~@angular/material/theming';

@include mat-core();

// Define the default theme (same as the example above).
$candy-app-primary: mat-palette($mat-indigo);
$candy-app-accent:  mat-palette($mat-pink, A200, A100, A400);
$candy-app-theme:   mat-light-theme($candy-app-primary, $candy-app-accent);

// Include the default theme styles.
@include angular-material-theme($candy-app-theme);

// Define an alternate dark theme.
$dark-primary: mat-palette($mat-blue-grey);
$dark-accent:  mat-palette($mat-amber, A200, A100, A400);
$dark-warn:    mat-palette($mat-deep-orange);
$dark-theme:   mat-dark-theme($dark-primary, $dark-accent, $dark-warn);

.unicorn-dark-theme {
  @include angular-material-theme($dark-theme);
}
<md-slider color="accent"></md-slider>
<button md-raised-button color="primary" (click)="toggleTheme()">Toggle</button>

I cannot provide a plunker because they seem not to have beta.3 release.

What is the use-case or motivation for changing an existing behavior?

It's a bug. The motivation should be clear.

Which versions of Angular, Material, OS, browsers are affected?

  • Angular 4.0.0 resp. 4.0.3
  • Angular Material 2.0.0-beta.3

Is there anything else we should know?

No

Metadata

Metadata

Assignees

Labels

P2The issue is important to a large percentage of users, with a workaround

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions