Introduction
Box sizing controls how the size of an element is calculated. It helps you decide if padding and borders are included in the width and height or added outside.
When you want to make sure an element fits exactly in a space without growing bigger because of padding or borders.
When you want consistent sizing for buttons or boxes, no matter their padding or border thickness.
When you want to avoid layout problems caused by padding or borders increasing the element size unexpectedly.