Well, for starters, you're wrong about the flex model . display:flex goes not to elements, but to the container block, so in your case it should be in <UL> , for example:
ul { display: flex; } .lst { list-style-type: decimal; margin:auto; }
Now, if you check this script , you will see your numbers there. The bad news: Mozilla has a documented bug and doesnβt work with Firefox, it only shows 0.
So, with all this, I propose in this case to cancel the Flex model or change the approach (why not use a div with a counter?), Because you are looking for problems and cross browser problems, not worthy of any solution that they could provide
EDIT: Now I see the LcSalazar answer, and it also offers counters, albeit with a different approach, so I think you could try playing with my answer plus the LcSalazar counter and get the cross-browser result, still using the full flexible model. It might work.
Devin source share