I had a discussion with a friend about styling numbers. Take for example the number 2000000. It is kind of hard to read as there is no spacing or dots between the numbers. So instead the number would be styled as 2.000.000 (with dots) or 2 000 000 (by spaces). The question is how to make this semantic correct? We both agreed that this is more of a styling issue than markup. But is there any way to make this in CSS?
The only way we thought this could be accomplished was to add span elements, ex.
2<span style="margin: 0 10px">000</span>000
But this solution is not really elegant. Should the server or application add spans when find long numbers? Instead the server or application could add hard spaces but then it is markup and not styling. To add dots is only possible by the server as I can see it, or can the :after pseudo element be used?
Do you have a good solution for this?