pulumi / docs

All things Pulumi docs!
https://pulumi.com
Apache License 2.0
125 stars 220 forks source link

SCSS chooser jumps around page on lengthy pages when the choice is clicked #1961

Closed metral closed 4 years ago

metral commented 4 years ago

Problem description

We have a k8s-language chooser done in the same fashion as our lang chooser, but for the choices of yaml vs TS vs TS-kx (kubernetesx).

I’ve noticed when i use many shortcodes in a single page across differing sections, each with their own {{< k8s-language noyaml }} header (for example), clicks on a language choice can cause the page to jump around. The very first k8s-langauge shortcode works fine and keeps the page in-place as expected, but any proceeding k8s-language sections will be thrown around the page on clicks.

cnunciato commented 4 years ago

This appears to be happening because of reflows resulting from changes to the content above the tab that was clicked. Looking into options.

cnunciato commented 4 years ago

Got a candidate fix -- will test across browsers and PR if it looks good.