Skip to content

Consistent disabled state for all components #19343

@LorenzHenk

Description

@LorenzHenk

At the moment, the disabled color of the slider is theme.palette.grey[400]. Other inputs use theme.palette.action.disabled (also used e.g. here) and theme.palette.text.disabled.

The Slider should use theme.palette.action.disabled as well.

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

The Slider uses theme.palette.grey[400].

Expected Behavior 🤔

The Slider should use theme.palette.action.disabled.

Steps to Reproduce 🕹

Example showing that theme.palette.grey[400] is used: https://codesandbox.io/s/material-demo-qpzdk

image

Note: I've forced the color with !important for the screenshot above.

Actually, this demo shows another problem with the current style system - the custom disabled style is not applied, because the css specifity of the default disabled class is higher than the one of the custom class - is this wished? Should I create another issue for this problem?

image

image

Steps:

  1. Create a custom theme to see the difference between grey[400] and action.disabled
  2. set disabled to true

Context 🔦

We edit some values of the palette, which leads to a difference between grey[400] and actions.disabled. All disabled inputs have the same color, except for the Slider component.
image

Your Environment 🌎

Tech Version
Material-UI v4.8.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking changeIntroduces changes that are not backward compatible.design: materialThis is about Material Design, please involve a visual or UX designer in the processscope: all componentsWidespread work has an impact on almost all components.

    Projects

    Status

    To process

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions