demo ยท v139

Typed Parameters

@function parameters can declare CSS Values 4 types: <color>, <length>, <percentage>. If a caller passes a value of the wrong type, the function silently falls back to initial โ€” the spec's defined invalid-input behaviour. Pick a parameter, try valid and invalid values, watch the result.

Requires Chrome 139+ behind chrome://flags/#enable-experimental-web-platform-features (the CSSFunctions flag). This page polyfills the type-check in JS so you can see the same accept/reject pattern everywhere; the @function source is what would ship.
--brand-chip()

the function

see also