argyleink / argyleink/open-props

Enable smooth scrolling for nested scrollers also

Open
#460 0 comments 0 reactions 1 assignee Claimed by @argyleink View on GitHub
enhancement
Dominant language
HTML
Stars
5.5k
Forks
216
PR merge metrics
No merged PRs in 30d

Description

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](https://www.youtube.com/watch?v=cCAtD_BAHNw).

```css
@media (--motionOK) {
:where(:has(:target)) {
scroll-behavior: smooth;
scroll-padding-block-start: max(2rem, 5svb);
}
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.