I first read about this (obviously impractical) method many years ago, in one place or another. I think it may have been in The Next Book of Omni Games, which I treasured for a time as a teenager. Another friend suspects it first came from Martin Gardner's Aha! Insight. I have neither of these volumes on hand as I write this, and would of course welcome any definitive word on the origin of this thought experiment.
Update: I learn through a helpful informant that Gardner's follow-up book Aha! Gotcha originally contained the story of an alien visitor who encodes the Encyclopaedia Britannica in a single, straight scratch on a metal rod.
Anyway, I don't recall anyone ever using JavaScript and CSS to actually build a working example of the silly idea, so I did. The original description predates the invention of modern digital text encoding (such as today's ubiquitous UTF-8), and I found a delightful puzzle in the prospect of developing a robust implementation that would work in a web browser.
I invite those wondering why I limit the input to only a few hundred characters to experiment with this method without this restriction. (The theory behind it really does support texts of indeterminite length, after all!)
Informatimago on Hacker News expresses informed skepticism.