sidebar: auto-adjust element spacing and size