My button is 54px wide and 57px tall but it's content is 50x50. Where is the extra space coming from ?
I know how to "fix" it, that's pretty easy i just have to set the button width and height. Just wondering why it's like this.
* {
margin: 0;
padding: 0;
box-sizing: content-box;
}
body {
width: 100vw;
height: 100vh;
}
svg {
width: 25px;
height: 25px;
margin: 12.5px;
}
<button>
<svg data-dialog-svg fill="none" stroke="currentColor"
strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" viewBox="0 0 24 24">
<path d="m6 9 6 6 6-6"></path>
</svg>
</button>