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

Cumulative layout shift #5603

Closed
MarcoTroost opened this issue Apr 30, 2024 · 1 comment
Closed

Cumulative layout shift #5603

MarcoTroost opened this issue Apr 30, 2024 · 1 comment

Comments

@MarcoTroost
Copy link

MarcoTroost commented Apr 30, 2024

What is affected?

Component

Description

Material Web components do not follow the 'natural' rendering-sequence within the DOM.

Components aren't HTML, so they first need to be processed in order to be seen. This results in cumulative layout shift which negatively affects the user-experience (and probably SEO too).

  • A possible solution could be a 'fallback-skeleton' of sorts, so that the initial space the component will occupy could be claimed in the DOM in advance.

  • Another solution could be to provide SSR support for multiple frameworks, such a Nuxt.

Reproduction

Workaround

I have not found a workaround.

Is this a regression?

No or unsure. This never worked, or I haven't tried before.

Affected versions

1.0

Browser/OS/Node environment

Latest Chrome on a MacBook

@asyncLiz
Copy link
Collaborator

Hi! Our components are HTML custom elements. They support SSR using @lit-labs/ssr (in fact, our https://material-web.dev catalog uses SSR!).

Here's a guide to get started: https://lit.dev/docs/ssr/overview/

@asyncLiz asyncLiz closed this as not planned Won't fix, can't repro, duplicate, stale Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants