James Kingston Clarke

TIL You can do conditionals in pure CSS

You can use the range syntax with if() to conditionally set CSS properties

/* Range style query in an if() statement */
.weather-card {
    background: if(
        style(--rain-percent > 45%): blue;
        else: gray;
    );
}

References