CSS Custom Functions are coming … and they are going to be a game changer!

February 12, 2025

Chrome is currently prototyping CSS Functions from the css-mixins-1 specification.A custom function can be thought of as an advanced custom property, which instead of being substituted by a single fixed value, computes its substitution value based on function parameters and the value of custom properties at the point it’s invoked.

Here’s a very simple example (taken from the spec) that should give you an idea of what a custom function looks like:

@function --negate(--value) {
result: calc(-1 * var(--value));
}

Source: CSS Custom Functions are coming … and they are going to be a game changer! – Bram.us

We try to avoid covering things as yet completely unavailable here and at our conferences but sometimes something is so exciting we want to at least put it on your roadmap.

Custom CSS Functions are one such thing.