Use style attributes when storing the previous elment size instead of the literal size of the element #220