Adapted to box-sizing.