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
clevermissfox
clevermissfox7mo ago
On phones it seems to be keeping the grid columns that only live in a min-width: 768px media query
Lamer of Sweden
Lamer of Sweden7mo ago
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
rikOP7mo ago
Testing... That was it.
Lamer of Sweden
Lamer of Sweden7mo ago
:thumbup:
rik
rikOP7mo 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
Lamer of Sweden7mo ago
:laugh: No worries!
clevermissfox
clevermissfox7mo ago
excellent catch
Want results from more Discord servers?
Add your server