slaks
Re:Silon – Adders and Logic Gates in Pure CSS
on Tuesday May 19, 2015 @10:59AM (#9570510)
I built this for fun, and to remind people that CSS can do more than you think. (it should also be a nice tool to help teach adders)
While I would obviously never do something this insane in a real product, I have used CSS for surprisingly much actual logic in real code (empty states for lists, hiding controls that the user cannot use, etc).
Re:Silon – Adders and Logic Gates in Pure CSS
on Tuesday May 19, 2015 @10:57AM (#9570486)
Note that that's all computed by LESS code.
https://github.com/SLaks/Silon#implementation-details https://github.com/SLaks/Silon/blob/gh-pages/styles/_operato...
The actual declarations end up being nicely simple; see https://github.com/SLaks/Silon/blob/gh-pages/styles/_themed-...
The CSS is just a truth table, but the LESS (which is Turing-complete) actually contains all of the logic.
Re:Silon – Adders and Logic Gates in Pure CSS
on Tuesday May 19, 2015 @10:54AM (#9570464)
I'm on GitHub pages, so I should be fine.