A freshly updated two-day workshop on developing games with CSS by Kevin Powell and Amit Sheen is now available (and discounted for a limited time).
Poking at the CSS if() Function a Little More: Conditional Color Theming
The CSS if()
function enables us to use values conditionally, which we can already do with queries and other functions, so I’m sure you’re wondering: What exactly does if()
do? Let’s look at a possible real-world use case.