4 Syntax and basic data types

Contents

4.1 Syntax

This section has been replaced by CSS Syntax Module Level 3 [CSS3SYN].

4.1.1 Tokenization

This section has been replaced by CSS Syntax Module Level 3 [CSS3SYN].

4.1.2 Keywords

This section has been replaced by CSS Syntax Module Level 3 [CSS3SYN].

4.1.2.1 Vendor-specific extensions

This section is informative.

This section has been replaced by Section 3 ("Requirements for Responsible Implementation of CSS") in CSS Snapshot 2015 [CSS].

4.1.2.2 Informative Historical Notes

This section is informative.

This section has been replaced by Section 3 ("Requirements for Responsible Implementation of CSS") in CSS Snapshot 2015 [CSS].

4.1.3 Characters and case

This section has been replaced by CSS Syntax Module Level 3 [CSS3SYN].

4.1.4 Statements

This section has been replaced by CSS Syntax Module Level 3 [CSS3SYN].

4.1.5 At-rules

This section has been replaced by CSS Syntax Module Level 3 [CSS3SYN].

4.1.6 Blocks

This section has been replaced by CSS Syntax Module Level 3 [CSS3SYN].

4.1.7 Rule sets, declaration blocks, and selectors

This section has been replaced by CSS Syntax Module Level 3 [CSS3SYN].

4.1.8 Declarations and properties

This section has been replaced by CSS Syntax Module Level 3 [CSS3SYN].

4.1.9 Comments

This section has been replaced by CSS Syntax Module Level 3 [CSS3SYN].

4.2 Rules for handling parsing errors

This section has been replaced by CSS Syntax Module Level 3 [CSS3SYN].

4.3 Values

4.3.1 Integers and real numbers

This section has been replaced by CSS Values and Units Module Level 3 [CSS3VAL].

4.3.2 Lengths

This section has been replaced by CSS Values and Units Module Level 3 [CSS3VAL].

4.3.3 URLs and URIs

This section has been replaced by CSS Values and Units Module Level 3 [CSS3VAL].

4.3.4 Counters

Counters are denoted by case-sensitive identifiers (see the 'counter-increment' and 'counter-reset' properties). To refer to the value of a counter, the notation 'counter(<identifier>)' or 'counter(<identifier>, <'list-style-type'>)', with optional white space separating the tokens, is used. The default style is 'decimal'.

To refer to a sequence of nested counters of the same name, the notation is 'counters(<identifier>, <string>)' or 'counters(<identifier>, <string>, <'list-style-type'>)' with optional white space separating the tokens.

See "Nested counters and scope" in the chapter on generated content for how user agents must determine the value or values of the counter. See the definition of counter values of the 'content' property for how it must convert these values to a string.

In CSS 2.2, the values of counters can only be referred to from the 'content' property. Note that 'none' is a possible <'list-style-type'>: 'counter(x, none)' yields an empty string.

Example(s):

Here is a style sheet that numbers paragraphs (p) for each chapter (h1). The paragraphs are numbered with roman numerals, followed by a period and a space:

p {counter-increment: par-num}
h1 {counter-reset: par-num}
p:before {content: counter(par-num, upper-roman) ". "}

4.3.5 Colors

This section has been replaced by CSS Color Module Level 3 [CSS3COLOR].

4.3.6 Strings

This section has been replaced by CSS Syntax Module Level 3 [CSS3SYN].

4.3.7 Unsupported Values

This section has been replaced by CSS Syntax Module Level 3 [CSS3SYN].

4.4 CSS style sheet representation

This section has been replaced by CSS Syntax Module Level 3 [CSS3SYN].

4.4.1 Referring to characters not represented in a character encoding

This section has been replaced by CSS Syntax Module Level 3 [CSS3SYN].