HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

var

Description

The var function for CSS specifies the value of a custom property substituted into the value of another property.

Syntax

CSS

var()

Values

<var()> =
    var(
        <custom-property-name>,
        <declaration-value>?
    )
<custom-property-name>

A valid identifier that starts with two dashes (--).

<declaration-value>

Any sequence of one or more tokens, so long as the sequence does not contain <bad-string-token>, <bad-url-token>, unmatched <)-token>, <]-token>, or <}-token>, or top-level <semicolon-token> tokens or <delim-token> tokens with a value of "!". It represents the entirety of what a valid declaration can have as its value.

Examples

1 · custom-property-name

2 · declaration-value

3 · JS