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

abs

acos

asin

atan

atan2

attr

calc

clamp

color

conic-gradient

cos

counter

counters

hsl

hsla

hwb

lab

lch

linear-gradient

matrix

matrix3d

max

min

mod

oklab

oklch

param

perspective

radial-gradient

rem

repeating-conic-gradient

repeating-linear-gradient

repeating-radial-gradient

rgb

rgba

rotate

rotate3d

rotateX

rotateY

rotateZ

round

scale

scale3d

scaleX

scaleY

scaleZ

sin

skew

skewX

skewY

src

tan

translate

translate3d

translateX

translateY

translateZ

url

World Wide Web Consortium (W3C)

HomeMenu