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

scroll-behavior: smooth not working as expected #33

Open
eduardomottoni opened this issue Sep 21, 2024 · 0 comments
Open

scroll-behavior: smooth not working as expected #33

eduardomottoni opened this issue Sep 21, 2024 · 0 comments

Comments

@eduardomottoni
Copy link

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.

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

1 participant