The site is responsive when viewed on codepen. Why not when served from GitHub pages?

I am confused. Grab your phone and go here: https://codepen.io/rikrose/pen/yLWJZov Now visit: https://night-vision-discord.github.io/website/starting-editing/ Why do they look different? I created the CodePen by doing view-source on the second page and cut-and-pasting to CodePen. The CodePen version has the effect I'm after (TOC goes to the top when the view window is narrow). Why doesn't it work when served from GitHub Pages?
7 Replies
curiousmissfox
On phones it seems to be keeping the grid columns that only live in a min-width: 768px media query
Lamer of Sweden
Yeah, seems to filter the property :/ Might have found the issue. You've missed adding the following meta tag in <head>.
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
I think codepen has that included among other stuff.
rik
rikOP2y ago
Testing... That was it.
Lamer of Sweden
:thumbup:
rik
rikOP2y ago
I have to fix the "cloning the repository" section", because the git clone command is overly-long. but it's fixed. Thank you!
Lamer of Sweden
:laugh: No worries!
curiousmissfox
excellent catch

Did you find this page helpful?