Consider this code
div {
box-sizing: border-box;
width: 0;
height: 0;
max-width: 0;
max-height: 0;
border: 1px solid gray;
padding: 12px;
overflow: hidden;
}
<div>Hi</div>
According to everything I've ever read, understood, and used about box-sizing: border-box;
This should show nothing since the width and height are zero and padding/border are inside of the zero width and height.
What we see however is a 26x26 box ((12 padding + 1 border)*2). What gives? Why is border-box
not working here?