chore(docs): add directive to pad heading anchors

Closes #2070
Closes #9360
Just copying the idea from other examples. I am not sure if there is any point...
I'll try with a `div` to see if it makes any difference since that is simpler