W3C home > Mailing lists > Public > www-style@w3.org > November 2001

WD-css3-values-20010713 comments

From: Etan Wexler <ewexler@stickdog.com>
Date: Fri, 30 Nov 2001 22:28:50 -0500
To: Web style list <www-style@w3.org>
Message-Id: <20011201032948.D0AD414F5C8@server11.safepages.com>
Values and Units <http://www.w3.org/TR/2001/WD-css3-value

2. Introduction <http://www.w3.org/TR/2001/WD-css3-value

"There are five main types of values in CSS"

...yet there are six types listed here.  Change "five" to "six".

"6. special cases (e.g. "color: #F00" and "font-size: Helvetica")"

Change "font-size" to "font-family".

3.1. Keywords <http://www.w3.org/TR/2001/WD-css3-value

"In the formal definition of property values, keywords 
appear literally."

If an identifier uses escape sequences, can it still match 
keyword values?

"All CSS3 properties accept the keyword value "inherit"."

Change to "All CSS3 properties accept the keyword values 
"inherit" and "initial"."

3.3.1. Lengths <http://www.w3.org/TR/2001/WD-css3-value

"The format of a length value (denoted by <length>) is an 
optional sign character ('+' or '-', with '+' being the 
default) immediately followed by a <number>(with or without 
a decimal point) immediately followed by a unit identifier (e.g., 
px, deg, etc.)."

3.3.2. Percentages <http://www.w3.org/TR/2001/WD-css

"The format of a percentage value (denoted by <percentage> in 
this specification) is an optional sign character ('+' or '-', with 
'+' being the default) immediately followed by a 
<number> immediately followed by '%'."

3.3.3. Angles <http://www.w3.org/TR/2001/WD-css3-value

"Their format is an optional sign character ('+' or '-', with '+' 
being the default) immediately followed by a 
<number> immediately followed by an angle unit identifier."

These passages repeat the double sign error of CSS2.  The 
<number> notation includes the optional sign; no additional sign 
is necessary or permissible.

This raises questions about time values and about frequency 
values: may these values have a sign at all?  May these values 
have a minus sign if the value is zero?

The wording about the plus sign is confusing.  The 
specification notes the plus sign as "being the default".  What 
is meant is that the semantics of the plus sign (positivity) is 
implicit in the absence of a sign.  This meaning should be stated 
as such.

3.3.1. Lengths <http://www.w3.org/TR/2001/WD-css3-value

"After the '0' length, the unit identifier is optional."

Only after '0', or after all zero notations?  In other words, are 
'0.0', '0000', and '.0' valid <length> notations?

"Child elements do not inherit the relative values specified for 
their parent"

To clarify, change to "Child elements do not inherit relative 
<length> values specified for their parent".

"in : inches -- 1 inch is equal to 2.54 centimeters."

Change "equal" to "approximately equal" unless the working 
group wishes to hamper the precision of user agents.

"pt : points -- the points used by CSS2 are equal to 1/72th of 
an inch."

How does one say "1/72th" in English?  That should be 
"1/72nd", yes?

3.4. Strings <http://www.w3.org/TR/2001/WD-css3-value

"A string cannot directly contain a newline. To include a newline in 
a string, use the escape "\A" (hexadecimal A is the line 
feed character in Unicode, but represents the generic notion 
of "newline" in CSS)."

What about line separator (U+2028) and paragraph separator 
(U+2029)?  Surely these characters, too, should cause line 
breaks, at least on Unicode-supporting user agents.

3.5.2. URIs <http://www.w3.org/TR/2001/WD-css3-value

"BODY { background: url("http://www.bg.com/pinkish.gif") }" ...
"LI { list-style: url(http://www.redballs.com/redball.png) disc }"

In accordance with best current practice (BCP32/RFC2606), 
the example host names should be in the top-level 
domain "example" or in the second-level domains 
"example.com", "example.net", or "example.org".

"The format of a URI value is 'url(' followed by optional 
whitespace followed by an optional single quote (') or double 
quote (") character followed by the URI itself, followed by 
an optional single quote (') or double quote (") character followed 
by optional whitespace followed by ')'. The two quote 
characters must be the same."

To clarify, add "A URI value is a single token, so no comments 
are permitted within it."

"Parentheses, commas, whitespace characters, single quotes (') 
and double quotes (") appearing in a URI must be escaped with 
a backslash: '\(', '\)', '\,'."

Be specific about the context.  Parentheses in a quoted URI, 
single quote marks in a double-quoted URI, and double 
quote marks in a single-quoted URI need no escaping.

3.5.3. Counters <http://www.w3.org/TR/2001/WD-css3-value

"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>)'. See 
"Nested counters and scope" [add ref] in the chapter on 
generated content [add ref]."

Add "The default style is 'decimal'."

3.6.2. Colors <http://www.w3.org/TR/2001/WD-css3-value

"The list of keyword color names is: aqua, black, blue, fuchsia, 
gray, green, lime, maroon, navy, olive, purple, red, silver, 
teal, white, and yellow."

The list in the Color working draft <http://www.w3.org/TR/200
1/WD-css3-color-20010305> has expanded.  The list here 
should simply refer to the Color specification for enumeration of 
the names.

"EM { color: rgb(255,0,0) }      /* integer range 0 - 255 */
EM { color: rgb(100%, 0%, 0%) } /* float range 0.0% - 100.0% */"

Eliminate the range restrictions.

"All RGB colors are specified in the sRGB color space (see 
[SRGB]). User agents may vary in the fidelity with which 
they represent these colors, but using sRGB provides 
an unambiguous and objectively measurable definition of what 
the color should be, which can be related to international 
standards (see [COLORIMETRY])."

The Color  working draft <http://www.w3.org/TR/2001/WD-css
3-color-20010305> permits the specification of other color spaces. 
 Eliminate this paragraph.

"Values outside the device gamut should be clipped"

Indicate that clipping occurs in actual values, not in 
computed values.

"Other devices, such as printers, have different gamuts to sRGB"

Change "to" to "than".

"If you use a background image or set the background color, 
please adjust foreground colors accordingly."

Change to "Authors who use a background image or set 
the background color should adjust foreground colors accordingly."

4.1. Specified values <http://www.w3.org/TR/2001/WD-css

"Often, the specified value does not need any computation, this 
is the case in example a in the table below."

Change "this" to "as".

"If a specified value is set on a shorthand property, it is 
considered to be set on all individual properties."

This is false.  Firstly, a shorthand property affects only 
some longhand properties, not all of them.  Secondly, there 
are shorthand properties whose value requires splitting into 
parts before assignment to the corresponding longhand properties. 
 If the entire value specified on the shorthand declaration 
is assigned to each of the constituent properties, errors result.

"When there is no winning declaration, there is no specified 
value. See example g in the table below."

This is troublesome because it leads to computed values like 'auto'. 
 We should say that, when there is no winning declaration, 
the specified value is considered the inherited value if the 
property inherits and the initial value otherwise.

4.2. Computed values <http://www.w3.org/TR/2001/WD-css

"Relative values, on the other hand, must be transformed 
into computed values: percentages must be multiplied by 
a reference value (each property defines which value that is), 
values with relative units (em, ex, px) must be made absolute 
by multiplying with the appropriate font or pixel size, 'auto' 
values must be computed by the formulas given with each 
property, certain keywords ('smaller', 'bolder', 'inherit') must 
be replaced according to their definitions. See example c, d and e 
in the table below. "

Some 'auto' values remain 'auto' after computation.  This is the 
case for the properties 'clip', 'page', 'page-break-after', 
'page-break-before', 'page-break-inside', 'play-during', 
'table-layout', and 'z-index'.  Change "'auto' values must 
be computed by the formulas given with each property" to 
"some 'auto' values must be computed by the formulas given 
with their property".

"Since lines have not yet been laid out, some computed values 
will remain "auto". See example f in the table below."

The prose and example are faulty.  The fact is that some 
properties have computing dependencies that require layout 
prior to computation.

The examples (a section which deserves an ID) must change 
to absolute length units for the computed and actual values.  
The 'px' unit is relative.

An interesting example, which demonstrates some of the quirks 
of CSS, follows.

Winning declaration: font: italic 45px/2.001 New  Style  Type, serif
Property: font-family
 Specified value: New  Style  Type, serif
 Computed value: "New Style Type", "Times"
 Actual value: "Old Style Type"
Property: font-size
 Specified value: 45px
 Computed value: 0.5in
 Actual value: 0.5in
Property: font-style
 Specified value: italic
 Computed value: italic
 Actual value: oblique
Property: font-variant
 Specified value: normal
 Computed value: normal
 Actual value: normal
Property: font-weight
 Specified value: normal
 Computed value: normal
 Actual value: normal
Property: line-height
 Specified value: 2.001
 Computed value: 1.0005in
 Actual value: 1in
Received on Friday, 30 November 2001 22:29:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:11 GMT