argyleink / argyleink/open-props
Enable smooth scrolling for nested scrollers also
Open
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.