Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLS optimization #21

Open
anton-karlovskiy opened this issue Jan 18, 2021 · 4 comments
Open

CLS optimization #21

anton-karlovskiy opened this issue Jan 18, 2021 · 4 comments
Assignees

Comments

@anton-karlovskiy
Copy link
Member

anton-karlovskiy commented Jan 18, 2021

cc @addyosmani

@anton-karlovskiy
Copy link
Member Author

anton-karlovskiy commented Jan 18, 2021

Reducing the CLS to 0 by adjusting the cookie consent UI and removing using https://fonts.googleapis.com/css?family=Roboto:300,400,500 (FOUT)

PR: #22
Lighthouse CI comparison: https://rocky-taiga-72405.herokuapp.com/app/projects/my-favorite-project/compare/d9dd9605-bb87-4982-9095-543b867d2af7?compareUrl=http%3A%2F%2Flocalhost%3APORT%2F&baseBuild=327747ab-831e-41d5-baab-44c119bdcd75

Before:
GitHub commit: da9520b
Vercel URL: -

After:
GitHub commit: 788dbc2
Vercel URL: https://nuxt-movies-1kaken5it.vercel.app/

FYI: We improved the LCP as well as CLS by not using https://fonts.googleapis.com/css?family=Roboto:300,400,500.

cc @addyosmani

@anton-karlovskiy
Copy link
Member Author

@addyosmani

FYI: Until #1 (comment) is clarified, I'm going to pause improving the CLS for now.

@anton-karlovskiy
Copy link
Member Author

I think we should fix this (in a way similar to what we did to the cookie consent UI element) on mobile cc @addyosmani
cls-occuring

@anton-karlovskiy
Copy link
Member Author

anton-karlovskiy commented Jan 22, 2021

On the person page e.g. http://localhost:3000/person/5470, there is a CLS on mobile view. Perhaps the aspect-ratio is broken there. cc @addyosmani
cls

@addyosmani
It's also fixed by using the nuxt-image module with explicit width and height attributes set for aspect-ratio.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant