You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure that each item in the jump links nav is active (shows the highlight color) at the correct time. Which is when that heading in the panel is at the top of the panel, but also accommodates for any sticky elements at the top of the page.
sticky items could include pfe-navigation or any other navigation
the jump-link-nav accordion on mobile
Ensure that when a user clicks an item in the jump links nav, it should scroll to the matching heading in the jump-links-panel, but is offset to accommodate for any sticky elements at the top of the page.
On mobile, when the user clicks on a link in the jump links nav, it should scroll to the matching heading in the jump links panel, and then should close the jump-links-nav**
**TBD
Ensure demo file has faux sticky nav on mobile & desktop, and demo.css leverages the --pfe-navigation--Height--actual css var and sets it to the same height as the faux nav.
Implementation details
Write a JS function that looks for items which have the class pfe-jump-links-panel__section in the jump-links-panel, then grabs the ID from that element, and moves it to a new div above that item, like this:
before upgrade: <h1 class="pfe-jump-links-panel__section" id="section1">Section 1</h1>
Ensure that the value of --pfe-jump-links--nav-height is accurately reported. Should be 0 on desktop, and should use report-height to include borders, so its correct on mobile.
Use --pfe-jump-links-panel__section--offset to affect the active highlight on the jump links nav headings, as well as the scroll position on the hash.
Goals
--pfe-navigation--Height--actualcss var and sets it to the same height as the faux nav.Implementation details
Write a JS function that looks for items which have the class
pfe-jump-links-panel__sectionin the jump-links-panel, then grabs the ID from that element, and moves it to a new div above that item, like this:<h1 class="pfe-jump-links-panel__section" id="section1">Section 1</h1>Create a variable like
--pfe-jump-links-panel__section--offsetand set the value to the sum (using calc) of these three thingsvar(--pfe-navigation--Height--actual)var(--pfe-jump-links--nav-height)var(--jump-links--nudge)Add css:
--pfe-jump-links--nav-heightis accurately reported. Should be0on desktop, and should use report-height to include borders, so its correct on mobile.--pfe-jump-links-panel__section--offsetto affect the active highlight on the jump links nav headings, as well as the scroll position on the hash.Impacted component(s)
Starter Branch
pfe-jump-links-demoRelated issues (closed in favor of this one)