mui / mui/material-ui

[RFC][material-ui] Should variant class names have the `variant` prefix?

Open
#41,277 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

customization: css RFC scope: all components
Dominant language
JavaScript
Stars
99.1k
Forks
32.5k
Avg merge
2d 17h
Merged PRs (30d)
106

Description

Extracted issue from https://github.com/mui/material-ui/pull/40688#discussion_r1500632090

What's the problem?

Currently, the variants' class names don't have a prefix, for example, MuiButton-outlined. This differs from other prop values classes with the prop name prefixed, for example, MuiButton-colorPrimary.

Should we change this for consistency? Is it worth it?

What are the requirements?
  • The accepted proposal should have an answer on whether the consistency and predictability of the API are enough of an argument to go through this change.
What are our options?
  • Add the variant prefix
  • Keep with the variant prefix
Proposed solution

No response

Search keywords:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked pull request discussion and compare the issue's examples, MuiButton-outlined and MuiButton-colorPrimary. The work is done when the project has an accepted proposal deciding whether variant class names should gain a variant prefix and explaining whether consistency justifies the change.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.