I believe this is a clever way to do it with css, but javascript would probably give a more realistic example because a true sum could be done following the same logic of identifying css class names.
Usun, et see on nutikas viis seda teha CSS, kuid javascript ilmselt annab rohkem realistlik nÃ¤ide, sest tÃµsi summa vÃµiks teha pÃ¤rast sama loogika kindlaks CSS klassi nimed.