-
Notifications
You must be signed in to change notification settings - Fork 43
Closed
Description
To make a TOC, two methods can be used: pat-navigation or pat-scroll.
The desired behaviour consists of 3 parts.
- Scrolling needs to be smooth.
- Upon click of a TOC item, the TOC item must be highlighted (class current or similar).
- Upon scrolling, the highlighting of the TOC must be updated.
Pat-navigation
- ✅ Perfect, but only when native scrolling of browser is used with CSS.
- ✅ Perfect.
- ❌ Doesn't happen.
Adding TOC update behaviour to pat-navigation would be great. Suggested automatic classes:
in-view to highlight any TOC element of which its corresponding element is currently in view. (Can be multiple at the same time)
in-view-latest to highlight the TOC element that entered the latest. (Always only one at the time)
Pat-scroll
- ✅ Only perfect when not used in combination with CSS smooth scrolling. Otherwise both scrolling methods compete.
- ❌ Erratic behaviour.
- ❌ Doesn't update or in other situations it does, but erratic.
Would be solved if:
- Bugs 2 and 3 would be fixed.
- A property would be added to disable JavaScript animated scrolling. Suggested property:
animation: none/auto.
Metadata
Metadata
Assignees
Labels
No labels