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

Fix snackbars of different width being left-aligned #376

Merged
merged 4 commits into from
May 8, 2021

Conversation

iamhosseindhv
Copy link
Owner

See #373 for more context.

@iamhosseindhv iamhosseindhv merged commit f188d2b into master May 8, 2021
@iamhosseindhv iamhosseindhv deleted the fix-different-width-alignment branch May 8, 2021 03:33
Comment on lines +23 to +26
pointerEvents: 'none',
[collapse.container]: {
pointerEvents: 'all',
},

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found this part is making the snack bar untouchable. pointer-events never get unset to all. I guess collapse.container rules do not apply. Can you check again? Thanks

Comment on lines +8 to +9
container: '& > .MuiCollapse-container',
wrapper: '& > .MuiCollapse-container > .MuiCollapse-wrapper',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I guess the problem is these two selectors. Those selectors do not appear in our DOM structure so pointer-events: all does not apply.

@@ -4,37 +4,71 @@ import { makeStyles } from '@material-ui/core/styles';
import { SNACKBAR_INDENTS } from './utils/constants';
import { SnackbarProviderProps } from '.';

const useStyle = makeStyles(theme => ({
const collapse = {
container: '& > .MuiCollapse-container',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This CSS class is deprecated. See mui/material-ui#24084
And I guess it is removed in v5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants