[material-ui] Review M3 token naming format

Open
#41,136 0 comments 5 reactions 1 assignee View on GitHub

@DiegoAndai is already working on this.

Since Feb 16, 2024.

Assessment

This issue has not been assessed yet.

Description

customization: theme design: material you on hold scope: all components type: enhancement

From https://github.com/mui/material-ui/issues/29345#issuecomment-1944438976:

The CSS tokens used don't appear to follow M3 guidelines fully. Like the tokens generated by https://material-foundation.github.io/material-theme-builder/ and https://github.com/material-foundation/material-color-utilities are completely kebab-cased (like --md-sys-color-on-primary) but @mui/material-next appear to have the last part camel-cased (like --md-sys-color-onPrimary).
Is this something overlooked or am I missing something? Just saying coz, it would be great if all the libraries using M3 followed it completely (like https://github.com/material-components/material-web) so that they could be drop-in replaced easily and not worry about matching themes.

We should review our current CSS variable naming format so it makes copying themes as easy as possible.

Search keywords: M3 tokens

Dominant language
JavaScript
Stars
99.1k
Forks
32.5k
Avg merge
2d 17h
Merged PRs (30d)
106

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.

More from mui/material-ui

All issues in mui/material-ui

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.