CSS named-feature() lets developers test browser behavior, not just syntax
A proposed CSS feature called named-feature() would allow developers to branch stylesheets based on how a browser behaves, rather than whether it merely parses a property. Current @supports checks can only verify if syntax is recognized, leaving no clean way to detect interop fixes or newly composable features. The function accepts a predefined keyword — such as anchor-position-follows-transforms — that a browser either claims to support or does not, keeping the logic inside the cascade rather than in JavaScript. The CSS Working Group is deliberately keeping the keyword list small, minting names only when a behavior is significant enough to be defined in the specification. This addresses a long-standing gap between a property existing and a property working as the spec intends.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in