2024/12/28
That all the grief with css borders shifting the layout can be avoided by using outline instead:
Outline is a line outside of the element’s border. Unlike other areas of the box, outlines don’t take up space, so they don’t affect the layout of the document in any way.
– https://developer.mozilla.org/en-US/docs/Web/CSS/outline#description