CSS grid-area example not working in chrome mobile

I'm watching the video "Why CSS grid-area is the best property for laying out content" (https://www.youtube.com/watch?v=duH4DLq5yoo) and have copied the code from codepen into an empty project. The columns work fine in desktop chrome but when accessing from phone or choosing "Mobile" in responsive view the areas does not stack. Anyone else have experienced this?
Kevin Powell
YouTube
Why CSS grid-area is the best property for laying out content
CSS Grid is amazing, and grid-area just make it so much better. When grid first launched I loved the idea of grid areas, but didn't get fully on board as it seemed like a little too much work... but once you start actually using them on a regular basis, you realize that while the initial setup in slightly longer, in the long run you can save a b...
12 Replies
Chris Bolson
Chris Bolson•12mo ago
If you share your codepen somebody might be able to take a look
Myndi
Myndi•12mo ago
Without code, it's impossible to tell. Type in "code.new" in the browser, and share it with us.
FredrikR
FredrikR•12mo ago
Gist
CSS Grid Example from Kevin Powel
CSS Grid Example from Kevin Powel. GitHub Gist: instantly share code, notes, and snippets.
Jochem
Jochem•12mo ago
I think you mean https://pen.new
Myndi
Myndi•12mo ago
No, just code.new to code in Assembly Kapp
FredrikR
FredrikR•12mo ago
I hope github gist above will suffice.
Myndi
Myndi•12mo ago
I copied exactly what you posted.
FredrikR
FredrikR•12mo ago
Try copying it to actual files and serve it bare with a webserver of some kind. In Chrome responsive view, select Mobile and see if it stops working.
Mannix
Mannix•12mo ago
try adding this meta tag <meta name="viewport" content="width=device-width, initial-scale=1"> to the head 😉
FredrikR
FredrikR•12mo ago
That was it! Thought it might be something that simple.
Mannix
Mannix•12mo ago
for future if you have a good editor it probably has emmet installed so you can just ! and hit tab to get boiler plate html 🙂