edit: ^ previously said "with css variables to hold state" or something similar (or my wires got crossed and I saw that somewhere else)
CSS variables can't be set by animations yet without JS's CSS Houdini giving them a type - a CSS @ property is in the works to do it without JS though!
[1] http://web.mat.bham.ac.uk/R.W.Kaye/minesw/infmsw.pdf