Solved with CSS! Logical Styling Based on the Number of Given Elements

This post is the third in a series about the power of CSS.
Article Series:

Colorizing SVG Backgrounds
Dropdown Menus
Logical Styling Based On the Number of Given Elements (this post)

Did you know that CSS is Turing complete? Did you know that you can use it to do some pretty serious logical styling? Well you can! You don’t have to set all of your logic-based styling rules in JavaScript, or even have to use JavaScript to set …
The post Solved with CSS! Logical Styling Based on the Number of Given Elements appeared first on CSS-Tricks.

Link: https://css-tricks.com/solved-with-css-logical-styling-based-on-the-number-of-given-elements/