-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
Problem with stepper styling #4280
Comments
I THINK this is some combination of the new rendering method in React and how the inline prefixing library works. |
@nathanmarks what can I do about it? Do you have any advice for me? |
I had something like this: const muiTheme = getMuiTheme({}, {
userAgent: 'all',
}); and changed it to const muiTheme = getMuiTheme({}, {
userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',
}); it works now, and I am able to develop the app further but certainly I have to fix it before going to production. Please help me to figure out proper inline prefixing with react. |
@maciejmyslinski The issue is not rooted in |
@nathanmarks @maciejmyslinski It is actually not possible to use the prefixer without a userAgent (which defaults back to inline-style-prefix-all), because React 15+ does not allow passing fallback strings as inline style. The prefixer API (at least the prefix-all by now) is already updated to return an array e.g. Therefore this is not really a bug within the prefixer but rather an issue with inline styles right now. PS: The reason why you see the values comma separated is because passing an array to the style will automatically do |
Thank you for this research @rofrischmann! |
For anyone facing this issue with const muiTheme = getMuiTheme();
if (process.env.PLATFORM === 'server') {
const prepareStyles = muiTheme.prepareStyles;
muiTheme.prepareStyles = (style) => {
style = prepareStyles(style);
if (typeof style.display === 'object') {
style.display = style.display.join(';display:');
}
return style;
};
}
...
<MuiThemeProvider muiTheme={muiTheme}> |
big thanks @oliviertassinari. Was hitting this issues in a Meteor SSR app. Works great with this hack. |
Problem description
Hello! I am using material-ui with MERN.
I try to implement stepper.
Everything works great but it looks like styling or autoprefixing is broken
Take a look at that code:
I found it is because wrongly prefixed
display
property.When I fixed it like this:
everything looks pretty.
I also wonder what is this
mui-prepared
...Steps to reproduce
Versions
The text was updated successfully, but these errors were encountered: