Screen Shot 2015-01-26 at 14.56.45

Some time ago I was captivated by the capabilities of CSS3. Although I didn’t (and still don’t) like designing websites and messing around with CSS (seriously, who likes spending hours trying to center objects properly) I noticed that the language itself had quite some power. That was when all sorts of mad ideas started popping in my head. Would it be possible to create a turing machine with only CSS and HTML? Could you program Tetris with it that way? What about rendering fractals, would that be possible?

Regarding the Turing machine, I haven’t successfully gotten that to work (I’m lacking a way to access (and store) data easily, it would help if I could use the attr method on alternate attributes other than data). In any case, I did manage to render some (simple) fractals.

Many fractals are defined in function of themselves, in other words they are recursive. CSS rules can be applied to children of a HTML object that already have the rules applied. If we build a specific HTML node tree, we can achieve some sort of semi-recursion.