mui / mui/material-ui

[system][docs] Clarifying differences between JSS- and Emotion-based `styled` utilities

Open
#39,381 1 comment 0 reactions 1 assignee View on GitHub

@mnajdova is already working on this.

Since Oct 11, 2023.

scope: styles support: docs-feedback support: question
Dominant language
JavaScript
Stars
99.1k
Forks
32.5k
Avg merge
2d 17h
Merged PRs (30d)
106

Description

Duplicates
  • I have searched the existing issues
Related page

https://mui.com/material-ui/migration/v5-style-changes/#styled

Kind of issue

Unclear explanations

Issue description

I was looking for ... and it appears that ...
I was looking into how to create reusable styled components. It appears that there are a couple of places from which I can import the utility fn, but it is not clear which is the correct one (or if all are the same?).

Migration guide says to change any usages of

-import { styled } from '@mui/material/styles';
+import { styled } from '@mui/styles';

But...

  • documentation for @mui/styles states that this is a legacy api.
  • documentation for styled states to use @mui/material/styles
  • tangential documentation uses @mui/material/styles

From the amount of ocurrences, seems like migration docs is outdated. Maybe its the same under the hood? Could anyone shed some light here? Thanks!

Context 🔦

I just migrated a project from v4 to v5.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.