# HG changeset patch # Parent 97c5014c04bb1b4c9085d83db29684753e55b1e6 Add more detail to keywords section, define type and case-sensitivity. diff --git a/Overview.src.html b/Overview.src.html --- a/Overview.src.html +++ b/Overview.src.html @@ -111,7 +111,7 @@ Value Definition Syntax

The syntax described here is used to define the set of valid values for CSS properties. A property value can have one or more components. -

+

Component value types

Component value types are designated in several ways: @@ -143,7 +143,14 @@ Component value types

Some property value definitions also include the slash (/) and/or the comma (,) as literals. These represent their corresponding tokens. -

+

All CSS properties also accept the keyword values ''inherit'' and + ''initial'' as their property value, but for readability these are not + listed explicitly in the property value syntax definitions. These + keywords cannot be combined with other component values in same + declaration; such a declaration is invalid. For example, + ''background: url(corner.png) no-repeat, inherit;'' is invalid. + +

Component value combinators

Component values can be arranged into property values as follows: @@ -167,7 +174,7 @@ Component value combinators a b | c || d && e f [ a b ] | [ c || [ d && [ e f ]]] -

+

Component value multipliers

Every type, keyword, or bracketed group may be followed by one of @@ -191,7 +198,7 @@ Component value multipliers group occurs one or more times, separated by comma tokens. -

+

Component values and white space

Component values are specified in terms of tokens, as described in required before the ''2'' to get this parsed as the two lengths ''1em'' and ''2em''. -

+

Property value examples

Below are some examples of properties with their corresponding value @@ -272,21 +279,6 @@ border-left: -1.2em -

Identifiers

- -

An identifier is an sequence of characters. Identifiers -cannot start with a digit, and there are other restrictions -[[!CSS3SYN]] on what characters an identifier can contain. Identifiers -must not be quoted.

- -
-
-pitch-range: inherit;
-counter-increment: header;
-
-
- -

Strings

A string is a sequence of characters enclosed by double quotes or single quotes. Double quotes cannot occur inside double quotes, unless escaped (as '\"' or as '\22'). Analogously for single quotes ("\'" or "\27"). @@ -342,26 +334,49 @@ that is composed of several values with is called a compound value. A value that is not a compound value is a simple value. +

+Keywords and Identifiers

-

Keywords

+

An identifier is a sequence of characters conforming to + the IDENT token in the + grammar. [[!CSS21]] + Identifiers cannot be quoted; otherwise they would be interpreted + as a string. -

In the value definition fields, keywords appear literally. Keywords are identifiers.

+

+Pre-defined Keywords

-
-

For example, here is the value definition for the 'border-collapse' -property:

-
-Value: collapse | separate
-
+

In the value definition fields, keywords with a pre-defined meaning + appear literally. Keywords are CSS identifiers and are interpreted + case-insensitively within the ASCII range (i.e., [a-z] and [A-Z] are + equivalent).

-

And here is an example of its use:

-
-table { border-collapse: separate }
-
-
+
+

For example, here is the value definition for the 'border-collapse' + property:

+
Value: collapse | separate
+ +

And here is an example of its use:

+
table { border-collapse: separate }
+
-

All CSS3 properties accept the keyword values 'inherit' and 'initial', as described in [[!CSS3CASCADE]]. +

+The ''initial'' and ''inherit'' keywords

+

As defined above, + all properties accept the ''initial'' and ''inherit'' keywords, + which represent value concepts common to all CSS properties. + +

The ''inherit'' keyword is + defined + in [[!CSS21]]. + +

The ''initial'' keyword represents the value that + is designated as the property's initial value. [[CSS3CASCADE]] + +

Should these keywords affect the specified or computed + value? See various + issues.

Would it be useful to have a 'default' value, defined to be equivalent to 'inherit' for properties @@ -373,6 +388,18 @@ since it wouldn't require thinking about inherited by default or not (which isn't obvious for some properties, such as text-decoration and visibility).

+

+User-defined Identifiers: the ''<identifier>'' type

+ +

Some properties accept arbitrary user-defined identifiers as a + component value. This generic data type is denoted by + <identifier>, + and represents any valid CSS identifier that does not + otherwise appear as a pre-defined keyword in that property's value + definition. + Such identifiers are fully case-sensitive, even in the ASCII range + (e.g. ''example'' and ''EXAMPLE'' are two different, unrelated + user-defined identifiers).

Numeric Data Types