Issue #22975:correctly format margin and marginpercent