Skip to content

scroll-behavior: smooth not working as expected #33

Open
@eduardomottoni

Description

@eduardomottoni

I am experiencing an issue where scroll-behavior: smooth is not functioning as expected in my project. The CSS property has been applied to the html and body elements, but there is no visible smooth scrolling effect on the page.

Steps to Reproduce:

Apply the following CSS in the app.css file:
css

html, body {
margin: 0;
padding: 0;
height: 100%;
width: 100%;
font-family: "Montserrat", sans-serif;
scroll-behavior: smooth;
}

Expected Behavior:
Smooth scrolling between sections when clicking on anchor links or using window.scrollTo().

Actual Behavior:
There is no smooth scroll effect; the page jumps abruptly to the desired position.

Environment:

Browser: Chrome & Edge
Operating System: Windows 11

Additional Information:
I have verified that the browser supports scroll-behavior: smooth and tried testing with a minimal setup, but the issue persists.

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