Cyclomatic Complexity: Logic in CSS – CSS Wizardry – CSS, OOCSS, front-end architecture, performance and more, by Harry Roberts

I recently hit upon a way of thinking that made me realise that CSS does include logic, and the fact that it’s rarely viewed as such is probably also why we end up with such poor CSS at all.I found myself explaining compound selectors to a client as being made up of the subject—the thing we’re actually interested in—and its conditions.

Source: Cyclomatic Complexity: Logic in CSS – CSS Wizardry – CSS, OOCSS, front-end architecture, performance and more, by Harry Roberts

Great article discussing how CSS does in fact contain some login based on your selectors, don’t overcomplicate it. Use as much specificity as you need and no more. I also like the reference to the Inception Rule.

Leave a Reply