how to reduce layout shift in astro

im currently in the process of rewriting my old personal site/blog in astro and i have almost finished it. but idk why the layout shift is so huge, please help deployed version: https://nexxel-dev-v2-6s310ftwp-nexxeln.vercel.app/
80 Replies
alrightsure
alrightsure•2y ago
I would think giving the body a width: 100% would help, but I can't test it in the browser since it resets the css every reload.
iDarkLightning
iDarkLightning•2y ago
Unrelated, ik, but your old one was so much better imo
nexxel
nexxel•2y ago
i will try this thanks what do you not like about the new one? i just wanted to have a depressed boring site tbh LUL old one got very bloated
alrightsure
alrightsure•2y ago
@nexxel how are you loading the font in? I think that's what's making the page jump on load.
nexxel
nexxel•2y ago
swap self hosted
alrightsure
alrightsure•2y ago
I'm not super well-versed in fonts but I'd probably mess with that. If you throttle the network and performance, you can see that it loads in another font first, then jumps to the correct layout once it loads in your font.
nexxel
nexxel•2y ago
yes that's what swap does but idk how to prevent the layout shift here
iDarkLightning
iDarkLightning•2y ago
Well if that was the goal... It just feels less vibrant and fun Nothing inherently bad with the design, but yk there's barely any design anyway so
nexxel
nexxel•2y ago
yeah that was kind of the goal :( i just want a site and not spend anymore time on it
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
nexxel
nexxel•2y ago
yes me too just help with this layout shift
iDarkLightning
iDarkLightning•2y ago
What's wrong with just living the current one as it is
nexxel
nexxel•2y ago
it has gotten really bloated and i don't wanna use next
iDarkLightning
iDarkLightning•2y ago
Hm
Finn
Finn•2y ago
Of the top of my head. The fonts arnt being cached beacuse they must load in every route change
Want results from more Discord servers?
Add your server