This is probably not a browser error, but perhaps an inadequately strictly defined specification.
What seems to be happening is that calculating the width of the elements li has several solutions. Its width depends on its contents (compressed to fit), and its width depends on their container (100%). Any value from 0 to infinity will work.
Now, for the ol element, the compression and matching algorithm is applied. From the basic CSS base block model
The calculation of the shrinkage width for matching is similar to the calculation of the width of a table cell using an automatic table layout algorithm. Rough: calculate the preferred width by formatting the content without breaking lines other than where explicit line breaks occur, and also calculate the preferred minimum width, for example, by trying all possible line breaks. CSS does not define an exact algorithm. Third, find the available width: in this case, the width of the containing block minus the used values ββof "margin-left", "border-left-width", "padding-left", "padding-right", border-right -width, 'margin-right and the width of any corresponding scrollbars.
Then the width of shrinkage to the stop: min (maximum (preferred minimum width, available width), preferred width).
Define in more detail using the text of David Baron.
The specification is clearly inadequate for this case, but it seems that for the preferred minimum width, a solution of width li = 0 is used, while for the preferred width, the solution of lithium width = inner width img is used. These choices seem unfounded to me, but I donβt know any part of the specification that requires them.
Assuming these values ββfor your example, the width of the ol element is the available width that you see.
Of course, the width of li and img cannot be displayed in several solutions, and there is nothing to limit the width of the elements li, which should be proportional to their container, so they display the img elements in accordance with the internal widths, overflowing them ol.