1

Kinda solved...

It is not possible with css. If you want to check out the project (currently only working in portrait) here is the link

I am currently rebuilding the Google calculator as a pwa.

I noticed in the app that if I put in more than 3 numbers there will be a space for every 1000x step.

123456789 => 123 456 789

Is there a way to do that with pure css? Like every :nth(3) from the right padding-right:.5rem.

If not possible I will use js.

Domenik Reitzner
  • 1,583
  • 1
  • 12
  • 21

2 Answers2

0

You can't achieve this using css only as you will need to read the input and modify it.

You'll need javascript to achieve this, for example : Adding space between numbers?

Martin
  • 552
  • 4
  • 16
0

Martin is right, you need to use a Javascript plugin like https://nosir.github.io/cleave.js/

Webvoid
  • 501
  • 2
  • 7