a slightly better implementation of box-sizing