Skip to content

[Bug]: Layout shifts if page contains images #1899

@cpAdm

Description

@cpAdm

Issue

The documentation suffers from layout shifting. This is especially annoying when going to the documentation with a link that has an anchor. E.g. https://playwright.dev/docs/test-ui-mode#metadata.
If you load this page for the first time (images are not cached yet), then you will not end up seeing the Metadata section at all.

Root cause

Due to the fact that images are loaded lazily, and their height/width are set to auto. There is no space reserved for these items.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions