Standardizing the API for dealing with paddings and margins