Make the navigation abel to shrink while scrolling

One some pages you can see the navigation beginning  to shrink as sone as you scroll the first time. This is the same feature allowing the user to specify an element that should be animated and the desired values that should be set. See example. 

Sadly github just gets my changes at once ... hopefully you could get the right lines ... if not feel free to ask.