Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable smooth scrolling for nested scrollers also #460

Open
argyleink opened this issue Jan 7, 2024 · 0 comments
Open

Enable smooth scrolling for nested scrollers also #460

argyleink opened this issue Jan 7, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@argyleink
Copy link
Owner

argyleink commented Jan 7, 2024

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);
  }
}
@argyleink argyleink added the enhancement New feature or request label Jan 7, 2024
@argyleink argyleink self-assigned this Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant