Skip to content

CSS rules specificity is order dependent on chips  #16374

Description

@jbblanchet

In v4, looking at the chips demo, the css rules specificity is dependent on the order of the css, which is problematic when using any build tools that might change the order

  • This is not a v0.x issue.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior 🤔

The should be no specificity conflict between classes.

Current Behavior 😯

Looking at the chips demo on your website, the generated code has both a .MuiChip-avatarColorPrimary and .MuiAvatar-colorDefault class defining the color and background-color css attributes. Same thing happens with .MuiChip-avatar and .MuiAvatar-root both defining width, height and font-size.

Steps to Reproduce 🕹

in https://material-ui.com/components/chips/, inpect element on the first blue chip shows:
Screenshot from 2019-06-25 15-50-34

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGreat for first contributions. Enable to learn the contribution process.priority: importantThis change can make a difference.scope: chipChanges related to the chip.type: bugIt doesn't behave as expected.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions