Adders and logic gates in pure CSS

Avatar of Chris Coyier
Chris Coyier on

DigitalOcean provides cloud products for every stage of your journey. Get started with $200 in free credit!

Experiment by Schabse Laks:

Silon is an experiment in the true power of CSS selectors. Most people would not expect CSS selectors to be capable of expressing arbitrary boolean logic. However, thanks to the sibling selector (AND), the comma selector (OR), and the :not() selector, this is actually completely possible.

To me the syntax looks more complicated than the CSS it compiles into, but hey I’m kind of a CSS guy.

Direct Link →