Skip to content

bug(mat-slider): when mat-slider has parent with .mat-accent it will not show the primary color #21271

Closed
@andreElrico

Description

@andreElrico

Reproduction

Steps to reproduce:

https://stackblitz.com/edit/angular-ma9v9u?file=src%2Fapp%2Flist-single-selection-example.html

Expected Behavior

mat-slider with color=primary should display primary color, nomatter where its used.

Actual Behavior

If parent has class mat-accent it will make the slider accent color.

Solution

The solution is obvious:

this here wins over mat-primary ... Im asking if other components are programmed in this same "general selector fashion"

Environment

latest stackblitz from docs (see date of this post)

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/slider

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions