DRY up base margin/padding functions