Better HN
topnewbestaskshowjobs
Log inSign up

slaks

1 karma · joined Oct 11, 2011 (15y ago) · 3 submissions

http://slaks.net
Submissions

comment 11y ago · link · parent

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).

See also http://stackoverflow.com/a/5239256/34397

comment 11y ago · link · parent

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.

comment 11y ago · link · parent

I'm on GitHub pages, so I should be fine.