Direct link to the article Solved with CSS! Logical Styling Based on the Number of Given Elements

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

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 classes you are styling against. In many cases, CSS can handle that itself. I’m still discovering new CSS tricks everyday, and it just makes me love it even more.
Avatar of Una Kravets
Una Kravets on (Updated on )

Signify “PDF Bombs”

Any ol’ anchor link can be a link to a PDF document, but clicking a link like that thinking otherwise can be surprising and uncomfortable for a user. This CSS can visually signify those links.

/* Add " (PDF)" text 
Avatar of Chris Coyier
Chris Coyier on (Updated on )