ThomasTJdev / nim_websitecreator

Nim fullstack website framework - deploy a website within minutes
https://nimwc.org
MIT License
176 stars 7 forks source link

Pure CSS Native Smooth Scroll #48

Closed juancarlospaco closed 5 years ago

juancarlospaco commented 5 years ago

https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavior Implement Pure CSS Native Smooth Scroll by default. Its just 1 Line of CSS. Implement globally for all by default.

ThomasTJdev commented 5 years ago

Interesting. We just need to be aware, that it has no support for Safari.

Are you thinking about removing: https://github.com/ThomasTJdev/nim_websitecreator/blob/master/public/js/js.js#L34-L45

juancarlospaco commented 5 years ago

Yes. Yes we can remove the JS and do it via CSS. CanIUse says 70% browsers can use it. But it fallsback to normal scroll if not supported.

ThomasTJdev commented 5 years ago

Hmm, iPhone users tends to like smooth scrolling and animations. I don't wont to miss out on them.. We need to ensure, that people with Apple products also get's a nice experience. If we are going to change it now, I could of course just insert the current JS-snippet into the JS-custom file.

juancarlospaco commented 5 years ago

I tried this, it has a problem This property specified on the body element will not propagate. It does not propagate, it does not get Inherited at all, theres no way to set it globally, user must set it individually if want to use it, is different than JS one.

Closing because Wont Fix.