Disabling Theme transitions do not work without the presence of CssBaseline
See original GitHub issueThe FAQ documentation states how to disable transitions with
import { createMuiTheme } from '@material-ui/core';
const theme = createMuiTheme({
transitions: {
// So we have `transition: none;` everywhere
create: () => 'none',
},
});
- This is not a v0.x issue.
- I have searched the issues of this repository and believe that this is not a duplicate.
Expected Behavior 🤔
Progress bars should not animate.
Current Behavior 😯
Transitions are not disabled. However if I add
import CssBaseline from "@material-ui/core/CssBaseline";
somewhere in the rendering tree, transitions stop
<MuiThemeProvider theme={theme}>
<div>
<CssBaseline />
<LinearProgress />
<br />
<LinearProgress color="secondary" />
</div>
</MuiThemeProvider>
Steps to Reproduce 🕹
See example: https://codesandbox.io/s/material-demo-yq0x1
Context 🔦
This is breaking all visual regression thats show progress bars.
Your Environment 🌎
Tech | Version |
---|---|
Material-UI | v4.1.3 |
React | v16.8.6 |
Browser | Chrome |
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Disabling Theme transitions do not work without the presence ...
I seems like documenting MuiCssBaseline and CssBaseline as a requirement to disable transitions is redundant and has unnecessary side effects ...
Read more >CSS Baseline - Material UI - MUI
The CssBaseline component helps to kickstart an elegant, consistent, and simple baseline to build upon.
Read more >how to disable all transitions in material UI while under test
There is a setting that can be applied in the Material UI theme that will globally disable transitions const theme = { transitions: ......
Read more >@material-ui/core | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >material-ui/core/CHANGELOG.md - UNPKG
This is a reminder that all ongoing work has moved to v5. This means a feature freeze on v4. The development of v4...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@KamalAman Yes, this would work too. The incentive for using CssBaseline is to rely on the theme configuration exclusively. Maybe we should only show the CSS that needs to be generated and leave the implementation out as a detail.
What do you think, do you want to submit a pull request? 😃
@oliviertassinari While adding CssBaseline did disable the transitions, it has other unnecessary side effects.
I seems like documenting MuiCssBaseline and CssBaseline as a requirement to disable transitions is redundant and has unnecessary side effects since it modifies other styles.
One solution is that you could just document how to disable transitions and animations without using a theme.
e.g. To disable transitions and animations add a global css selector