The new if() function in CSS, available from Chrome 137, allows for inline conditionals, enabling cleaner and more dynamic styling. if() supports three types of queries: style(), media(), and supports(), allowing immediate application of styles without relying on parent elements. Using if(), developers can style elements based on their state, such as progress cards, by directly referencing data attributes or custom properties.