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

[Docs] emotionCache global selector plugin affects styles #37368

Closed
2 tasks done
acomanescu opened this issue May 22, 2023 · 1 comment · Fixed by #37362
Closed
2 tasks done

[Docs] emotionCache global selector plugin affects styles #37368

acomanescu opened this issue May 22, 2023 · 1 comment · Fixed by #37362
Labels
bug 🐛 Something doesn't work docs Improvements or additions to the documentation regression A bug, but worse

Comments

@acomanescu
Copy link

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Steps to reproduce 🕹

No response

Current behavior 😯

While working with the docs, I noticed that all anchors and buttons have a box-shadow on hover. Doing some investigation I discovered that emotion custom plugin removes component class selector & and propagates the styles to global scope.

The plugin is transforming:

.css-uk1x50-MuiPaper-root:is(a, button) {
  &:hover: {
    boxShadow: 0px 4px 20px rgba(170, 180, 190, 0.3)
  }
}

into

:is(a, button) {
  &:hover: {
    boxShadow: 0px 4px 20px rgba(170, 180, 190, 0.3)
  }
}

This should be fixed, because while debugging I've observed that there are multiple styles propagating to the global scope.

Expected behavior 🤔

I expect the CSS selectors to remain unchanged.

Context 🔦

No response

Your environment 🌎

npx @mui/envinfo
System:
    OS: macOS 13.3.1
  Binaries:
    Node: 20.0.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.6.4 - /usr/local/bin/npm
  Browsers:
    Chrome: 113.0.5672.126
    Edge: Not Found
    Firefox: 113.0.1
    Safari: 16.4
@acomanescu acomanescu added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label May 22, 2023
@ZeeshanTamboli
Copy link
Member

Thanks for reporting. We are already aware of this and it will be fixed in #37362.

@ZeeshanTamboli ZeeshanTamboli added bug 🐛 Something doesn't work docs Improvements or additions to the documentation regression A bug, but worse and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work docs Improvements or additions to the documentation regression A bug, but worse
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants