open-props
open-props copied to clipboard
Enable smooth scrolling for nested scrollers also
Currently the style only applies to the root scroller html, missing nested scrollers. This will match any of them that use url hash targets inside. Also adds scroll padding. Nice use case shown by Kevin here.
@media (--motionOK) {
:where(:has(:target)) {
scroll-behavior: smooth;
scroll-padding-block-start: max(2rem, 5svb);
}
}