I have created an HTML button with a narrow border. When you click on the button, I change the width of the border. In the demo below, this change is highly exaggerated. On Google Chrome 84.0.4147.89 and Opera 70.0.3728.71, the changed border-width has the effect of moving the button downwards. On Firefox 79.0, the buttons stay where they are, which is what I expect.
button {
width: 30vmin;
height:30vmin;
border: 1vmin solid #888;
box-sizing: border-box;
}
button:active {
border-width: 10vmin;
}
<button></button>
<button></button>
<button></button>
Why is this happening on Chrome and Opera? How can I get the buttons to stay in their initial position on all browsers?