CSS - @function

概要

ルール名@function
構文 @function functionName ( argument#? ) [ returns cssType1 ]? { ... result: ... } argument = argumentName cssType1? [ : defaultValue ]? cssType1 = cssType2 | type(cssType2 [ | cssType2 ]#) cssType2 = < cssType3 > [# | ?]? cssType3 = angle | color | custom-ident | image | integer | length | length-percentage | number | percentage | resolution | string | time | url | transform-function
サポートChrome 139~

説明

CSS で関数を定義することができます。詳細は「CSSカスタム関数」を参照してください。

リンク