biotope / website

https://biotope.sh
MIT License
4 stars 0 forks source link

smooth scrollig effect on buttons #103

Closed IvailoStoyanov closed 5 years ago

luke-m commented 5 years ago

Seems to work in my chromium based Brave browser, firefox and chrome itself. Doesn't work in Safari.

luke-m commented 5 years ago

image

Looks weird in Safari. @IvailoStoyanov can you check this out please.

luke-m commented 5 years ago

^ this only happens in this branch, that's why I'm posting it here.

IvailoStoyanov commented 5 years ago

The issue seems to be on Develop as well I will not fix it through this branch however

clemensf commented 5 years ago

why did you implement this with element.scrollIntoView? according to MDN scrollIntoViewOptions like "behaviour: smooth" are only supported by Firefox 36+ and no other browsers (!).

the other approach - we where talking about this morning - would be CSS scroll behaviour: html { scroll-behavior: smooth; }

This would be supported by Firefox 36+, Chrome (61+) and Opera (48+)

I just might have found an old page on MDN. Both solutions seem to have the same (above) browser support. Also Ivaylo just told that the css solution would have messed with the scroll animation, so is not applicable here.