Minimal example for my question:
console.log(document.getElementById('form').offsetHeight)
console.log(document.getElementById('textarea').offsetHeight)
form {
background: orange;
}
textarea {
background: lightblue;
border: 0;
box-sizing: border-box;
height: 100px;
}
<form id="form"><textarea id="textarea"></textarea></form>
The <textarea>
has a height of 100px but <form>
has a height of 4px? Where is the extra 4px of height for the <textarea>
coming from? How can I eliminate the extra height?