CSS @function
The CSS `@function` at-rule allows you to create reusable, static functions, making your code more DRY (Don't Repeat Yourself), modular, and maintainable. This post covers the `@function` syntax as implemented in recent Chrome 139+ and as specified in the [CSS Custom Functions and Mixins Module Level 1](https://www.w3.org/TR/css-mixins-1/) draft. ## What It Is The CSS `@function` at-rule is conceptually similar to the [SASS @function](https://sass-lang.com/documentation/at-rules/function/) at-rule. ```css @function --function-name(--arg1 = default, --arg2) returns
| ✅ Supported | ❌ Not Yet Supported |
|---|---|
|
|