A class to manipulate the dimensions of an element