Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[makeStyles] $ruleName does not work in styles as a function #28180

Closed
2 tasks done
bishonen opened this issue Sep 6, 2021 · 2 comments
Closed
2 tasks done

[makeStyles] $ruleName does not work in styles as a function #28180

bishonen opened this issue Sep 6, 2021 · 2 comments
Labels
bug 🐛 Something doesn't work duplicate This issue or pull request already exists package: styles Specific to @mui/styles. Legacy package, @material-ui/styled-engine is taking over in v5.

Comments

@bishonen
Copy link

bishonen commented Sep 6, 2021

Following the tutorial from here, the solution does not seem to work when trying to add props into the mix.

  • 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 😯

When adding props to the mix, a classname for .MuiButton-contained.Mui-disabled is not created.
The color red is not injected anywhere.

Expected Behavior 🤔

A classname override for .MuiButton-contained.Mui-disabled should be added to css.

Steps to Reproduce 🕹

Example can be seen here. I just added ~2 lines to the template code from mui's tutorial.

https://codesandbox.io/s/material-demo-forked-ocv2l

Context 🔦

An increased specificity should be possible with additional props usage.

@bishonen bishonen added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Sep 6, 2021
@siriwatknp siriwatknp changed the title Increasing Specificity via merged classNames [makeStyles] $ruleName does not work in styles as a function Sep 7, 2021
@siriwatknp
Copy link
Member

@bishonen We are moving to v5 which uses different styling engine from v4, you can find the documentation here @oliviertassinari I remember that this is the existing bug in makeStyles, do you know if we already have an open issue? the best one that I can find is #26823

@siriwatknp siriwatknp added bug 🐛 Something doesn't work package: styles Specific to @mui/styles. Legacy package, @material-ui/styled-engine is taking over in v5. and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Sep 7, 2021
@mnajdova
Copy link
Member

mnajdova commented Feb 9, 2022

Duplicate of #26823

@mnajdova mnajdova marked this as a duplicate of #26823 Feb 9, 2022
@github-actions github-actions bot added the duplicate This issue or pull request already exists label Feb 9, 2022
@github-actions github-actions bot closed this as completed Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work duplicate This issue or pull request already exists package: styles Specific to @mui/styles. Legacy package, @material-ui/styled-engine is taking over in v5.
Projects
None yet
Development

No branches or pull requests

3 participants