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

Pre-style to avoid Layout Shift #487

Merged
merged 2 commits into from
Jul 20, 2021
Merged

Pre-style to avoid Layout Shift #487

merged 2 commits into from
Jul 20, 2021

Conversation

Malvoz
Copy link
Member

@Malvoz Malvoz commented Jul 18, 2021

Fix #376.

intrinsic-size.mp4

I'm only adding these styles to the "main" HTML documents, and not every HTML file in this repo because that's a bit tedious. And these are ("advanced") styles to progressively enhance the map viewer, nothing essential.

How/why to pre-style to avoid Layout Shift is to be documented, per Maps4HTML/web-map-doc#26.

@Malvoz
Copy link
Member Author

Malvoz commented Jul 18, 2021

Firefox does not support contain-intrinsic-size btw, which is fine. Again, this is to progressively enhance the map element(s).

@prushforth
Copy link
Member

Thank you.

@prushforth
Copy link
Member

I'll have a look at the documentation issue. Good idea.

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

Successfully merging this pull request may close these issues.

Layout Shift due to no intrinsic size before elements are upgraded
2 participants