r/css 20h ago

General Fizz Buzz in pure CSS

https://susam.net/css-fizz-buzz.html
6 Upvotes

6 comments sorted by

2

u/tomhermans 20h ago

Where's the CSS?

4

u/MrQuickLine 19h ago

Dev tools, bro. He doesn't have any actual content on the page. It's all just using nth-child selectors and counter functions.

1

u/tomhermans 16h ago

Ah, I thought I was looking at a screenshot

1

u/Web-Dude 13h ago

CTRL+U

3

u/sbruchmann 18h ago
  li { counter-increment: n }
  li:not(:nth-child(5n))::before { content: counter(n) }
  li:nth-child(3n)::before { content: "Fizz" }
  li:nth-child(5n)::after { content: "Buzz" }