question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[IE11] Material-UI styles are not isolated between components

See original GitHub issue

Describe the bug
In Internet Explorer 11, when having multiple direflow components using material-ui components in the same page, styles are not isolated between components. It leads to a corrupted style.

I think CSS encapsulation in web components has some limitations, especially when using Internet Explorer. We should use a prefix or something to make any CSS class unique and avoid any style corruption.

I will submit a pull request very soon to fix this issue.

To reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/alex-fournier/hello-direflow.git
  2. cd hello-direflow
  3. yarn install
  4. yarn start
  5. Open http://localhost:3000 in IE 11
  6. The Select mui component in Foo component is broken due to the styles added by Button mui component in Bar component.

Expected behavior
Material-UI styles should be encapsulated in shadow dom and should not impact other components.

Package Manager:
To install Direflow, I used yarn

Expected

expected

Actual result in IE11

actual

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
JohnDevedcommented, Feb 15, 2021

Yes sorry, kind of got carried away with stuff. I’ll make sure to approve it asap, so that it won’t be a blocker for you anymore

0reactions
alex-fourniercommented, Feb 16, 2021

Thanks a lot 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

react material-ui on IE 11 - Stack Overflow
I'm working on a react site that makes use of Material-ui components. I couldn't get ...
Read more >
Supported platforms - Material UI - MUI
IE 11 · Some of the components have no support. For instance, the new components, the data grid, the date picker. · Some...
Read more >
Isolating styles for Internet Explorer with Styled Components
Organising styles to isolate those for old browsers. Making CSS maintainable and of clear intention.
Read more >
CHANGELOG.old.md - mui/material-ui - Sourcegraph
You can find the component in the lab. Simplify the theme overrides with TypeScript for the components in the lab (#21279) @CarsonF. In...
Read more >
5 reasons or thoughts on Fluent UI Web - N8D
Fluent UI is not the new Office UI Fabric. It is the upcoming and continually evolving design system for Microsoft 365.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found