Table of Contents

Css - (Property) Value

About

A property value can have one or more components (value). Component values are specified in terms of tokens.

Common value computations

CSS-wide common keywords

initial

The initial keyword represents the value specified as the property’s initial value.

inherit

The inherit keyword represents the computed value of the property on the element’s parent.

unset

The unset keyword acts as either inherit or initial, depending on whether the property is inherited or not.

Type

Value types are designated in several ways:

Operator

Component values may be arranged into property values as follows:

Spaces may appear between tokens in property values.

Juxtaposition is stronger than the double ampersand, the double ampersand is stronger than the double bar, and the double bar is stronger than the bar. Thus, the following lines are equivalent:

    a b   |   c ||   d &&   e f
  [ a b ] | [ c || [ d && [ e f ]]]

Modifier

Every type, keyword, or bracketed group may be followed by one of the following modifiers:

Example

The following examples illustrate different value types:

    Value: N | NW | NE
    Value: [ <length> | thick | thin ]{1,4}
    Value: [<family-name> , ]* <family-name>
    Value: <uri>? <color> [ / <color> ]?
    Value: <uri> || <color>
    Value: inset? && [ <length>{2,4} && <color>? ] 

Documentation / Reference