Skip to content

The appearance/disappearance of scroll bars causes the layout to shift #69

@annhilati

Description

@annhilati

Context

No response

Description

If a page has a lot of content, a scroll bar appears on the side. However, when the scroll bar is present, the width of the content becomes slightly smaller and, since everything is centered, the center also shifts slightly to the left. When switching between pages that are long and therefore have a scroll bar and those that do not, the center of the content moves, which is aesthetically disturbing.

For me the following in an extra_css file has solved this issue:

html {
    overflow-y: auto;
    scrollbar-gutter: stable;
}

Related links

I don't think any are necessary here.

Use Cases

The proposed changes would mean that the scroll bars of longer pages would no longer affect the center of the content, and thus that switching between pages with a lot of content and pages with little content would no longer cause the center to jump.

Visuals

No response

Before submitting

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue reports a bugresolvedIssue is resolved, yet unreleased if open

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions