This is my sieve of Eratosthenes in CSS. How fast is it?
<style>
.numbers li{
display: inline-block;
counter-increment: numbers;
color: grey;
text-align:center;
padding: 0.5vw;
width: 30px;
height: 30px;
line-height: 30px;
border: 1px solid red;
border-radius: 50%;
color: red;
}
.numbers li::before{
content: counter(numbers);
}
.numbers li:first-child,
.numbers li:nth-child(2n+2),
.numbers li:nth-child(3n+6),
.numbers li:nth-child(5n+10),
.numbers li:nth-child(7n+14)
{
color: #aaa;
border-color: transparent;
}
</style>
<ul class="numbers">
<li></li>
<li></li>
<li></li>
...
<li></li>
<li></li>
<li></li>
</ul>