-
Notifications
You must be signed in to change notification settings - Fork 0
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
Navbar #7
base: main
Are you sure you want to change the base?
Conversation
<Container | ||
sx={{ | ||
position: 'relative', | ||
zIndex: 2, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 can we accomplish this without z-index
? Usually I try to avoid modifying z-index
because it can lead to really challenging visual bugs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the Hero component example, the zIndex is used to control the layering of the overlay, background image, and text. It appears to be semantically aligned with MUI's best practices.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be able to just rely on the default stacking order for these elements.
Changes ready for review by @newswim |
backgroundSize: 'cover', | ||
backgroundPosition: 'center', | ||
position: 'relative', | ||
color: 'white', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the color here for the inner text elements? If so I would add color attributes to the specific element and not this parent.
{/* Overlay */} | ||
<Stack | ||
sx={{ | ||
position: 'absolute', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 seems a little bit odd... I'm not sure why the absolute positioning is being used here. Are you just wanting to center this element?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also seems odd to have a Stack
without any child elements.. the whole point of Stack is to position child elements.
Changes: