~/talk

How to create pure CSS games

Talkat CSSCamp 2021 · on Wednesday, 2021-07-14· [css, creative-coding]
links:none on file
slides:none on file

A playable arcade page built with only HTML and CSS (Pug and Sass preprocessors compile the source) creates 100 clickable virus sprites whose visuals are pseudo‑elements, randomized positions and sizes from Sass random() and generated with Sass loops. State uses hidden input checkboxes and radios plus label toggles and :checked + sibling selectors to swap frames, CSS counters to tally score, CSS animation on content for the countdown, and a form reset to restart — the live CodePen demo works.

AI-written summary · about

  1. 0:00Introduction and inspiration
  2. 3:55Creating the virus creature
  3. 8:54Dynamic CSS with loops
  4. 12:27Pure CSS game logic
  5. 17:20Handling clicks and scores
  6. 21:57Pure CSS countdown
  7. 24:03Randomizing elements
  8. 26:51Game reset and replay
  9. 28:15Key takeaways and conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.