I'm trying to make two divs equal. One has its own size in rem, and the other should be equal to the first, but it has a border (its width is also in rem). Thus, I decided to calculate its size as the size of the first minus the total thickness of the borders. Nevertheless, they remain different sizes, differing in shares of pixel. When I use px (in my case it is undesirable), such a problem doesn't happen.
<body>
<div style="height: 10.16rem; width: 10.16rem; background-color: aqua;"></div>
<div style="height: 10rem; width: 10rem; border: 0.08rem solid aqua; background-color: blue;"></div>
</body>
It seems that the thickness of the border in rem obeys some other laws, but I have not found an answer to this anywhere. In theory, in both cases, divs should be equal, since rem is counted from the font size in html.