W3cubDocs

/CSS

CSS Functionals

CSS functional notation is a type of CSS value that can represent more complex data types or invoke special data processing or calculations.

Syntax

selector {
  property: functional-notation( [argument]? [, argument]! );
}

The syntax starts with the name of the functional notation, followed by a left parenthesis (. Next up are the notation argument(s), and the function is finished off with a closing parenthesis ).

Functions can take multiple arguments, which are formatted similarly to CSS property values. Whitespace is allowed, but they are optional inside the parentheses. In some functional notations multiple arguments are separated by commas, while others use spaces.

Index

Functional notation defined by a set of CSS specifications includes the following:

A B C D E F G H I L M O P R S T U V

Specifications

Specification Status Comment
CSS Values and Units Module Level 4 Editor's Draft Adds toggle(), attr(), calc(), min(), max(), clamp(), round(), mod(), rem(), mod(), sin(), cos(), tan(), asin(), acos(), atan(), atan2(), pow(), sqrt(), hypot(), log(), exp(), abs() and sign() functional notation.
CSS Values and Units Module Level 3 Candidate Recommendation Adds calc() functional notation.
CSS Color Module Level 4 Working Draft Adds commaless syntaxes for the rgb(), rgba(), hsl(), and hsla() functional notation.
Allows alpha values in rgb() and hsl(), turning rgba() and hsla() into (deprecated) aliases for them.
Adds hwb(), device-cmyk(), and color() functions.
CSS Color Module Level 3 Recommendation Adds rgba(), hsl(), hsla() functional notation.
CSS Images Module Level 4 Working Draft Adds element(), image(), image-set() and conic-gradient() functional notation.

See also

© 2005–2020 Mozilla and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Functionals