Height, width and depth for consumer units are defined starting on the face that is exposed the consumer. It makes no difference if an item is placed on the shelf, in a cupboard or in a box.
GS1 Package and Product Measurement Standard >>
The front is the face with the largest area and which is used to sell the item to the consumer, that is the face which is marked with for example the functional name and/or the brand. This definition applies even if the package is placed on the shelf in a different way, for example table margarine. The front is defined as the margarine packet’s lid since the brand name is largest on this face.