felipefialho / css-components

:coffee: A set of common UI Components using just the power of CSS and without JavaScript.
https://css-components.felipefialho.com/
MIT License
693 stars 126 forks source link

Smooth Scroll behavior #46

Open sidnei-junior opened 2 years ago

sidnei-junior commented 2 years ago

add in project new attribute css scroll-behavior and scroll-margin-top. the behavior of the anchors will be nicer

sidnei-junior commented 2 years ago

html { scroll-behavior: smooth; } :target { scroll-margin-top: 32px; }

felipefialho commented 2 years ago

Hey @sidnei-junior, could you open a PR with this feature? 😁

Thanks