I'm having trouble figuring this out. My tech stack includes Next.js, TypeScript, and Chakra UI.
- When I inspect my application, everything looks great as intended.
- On mobile, it works perfectly fine.
- However, when I view it on my physical iPad without using inspect tools, the display is completely zoomed in.
- One solution could be to remove 'fixed' from my desktop media query, but I prefer to keep it for the desktop version.
- I've tried various suggestions, even from ChatGPT, but the issue persists.
- For reference, I attempted using Chakra UI attributes like base, md, sm, lg, with no success, hence resorting to classic CSS for media queries utilizing max and min styles.
Could this be a specific problem with Chakra UI?
< Container
maxW="100%"
id="contact"
backgroundImage={`url('/imgs/contact_banner.png')`}
backgroundSize="cover"
sx={{
backgroundAttachment: 'scroll',
// Media Queries
'@media screen and (min-width: 390px)': {
backgroundAttachment: 'scroll',
},
'@media screen and (min-width: 481 and max-width: 768px)': {
backgroundAttachment: 'scroll',
backgroundPosition: 'cover',
},
'@media screen and (min-width: 1024px)': {
backgroundAttachment: 'fixed',
backgroundSize: 'cover',
// backgroundPosition: 'center',
},
}}
>