data-type

<dashed-function> — CSS reference

A custom CSS function name begins with two hyphens. The dashed-function grammar represents a function token plus its arguments; it is not the same as a dashed identifier. Use a registered custom function only where supported.

Formal Syntax & Structure

css syntaxcss
width: --double(4px);

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>&lt;dashed-function&gt;</title><style>body{margin:0;background:white}#a{box-sizing:border-box}@function --double(--n <length>) returns <length> { result:calc(var(--n)*2); } #a{width:8px;width:--double(4px)}</style><body><div id="a">Example</div></body></html>
CSS Reference