Smarter paddings and margins