W3C home > Mailing lists > Public > public-css-testsuite@w3.org > October 2010

Re: invalid tests about range of integer values

From: Gérard Talbot <css21testsuite@gtalbot.org>
Date: Mon, 4 Oct 2010 21:46:20 -0700
Message-ID: <8358433a503a515b832ddd516fcb7647.squirrel@cp3.shieldhost.com>
To: "L. David Baron" <dbaron@dbaron.org>
Cc: "public-css-testsuite@w3.org" <public-css-testsuite@w3.org>

> On Monday 2010-10-04 17:26 -0700, "GĂ©rard Talbot" wrote:
>> > The following tests (in 20100917; I only spot-checked newer releases
>> > to check that some tests were still problematic) are invalid because
>> > they assume that CSS defines an allowed range of integer values,
>> > which it does not:
>> > counter-increment-013
>> [snipped]
>> {
>> (...)
>> > <meta name="assert" content="The property z-index set to a minimum
>> value minus 1 is correctly truncated to the minimum value.">
>> This assertion was discussed at the CSS WG F2F in Beijing. It was
>> decided that tests need to test some boundaries that were reasonable.
> What was decided is, I believe, that it was reasonable to test that
> a reasonable range of values are supported.  It is not, however,
> reasonable to test that values outside that range are unsupported or
> truncated, based on the current spec.


Isn't it what is supposed to happen with values outside a range?

Quote from the spec:

many properties that allow an integer or real number as a value actually
restrict the value to some range (...)
Some properties allow negative length values, but this may complicate
the formatting model and there may be implementation-specific limits. If
a negative length value cannot be supported, it should be converted to
the nearest value that can be supported.
em { color: rgb(300,0,0) }       /* clipped to rgb(255,0,0) */
em { color: rgb(255,-10,0) }     /* clipped to rgb(255,0,0) */
em { color: rgb(110%, 0%, 0%) }  /* clipped to rgb(100%,0%,0%) */

Restrict, convert, clip: these verbs seem to support truncation of
values exceeding the range (floor or ceiling values).

regards, Gérard
Contributions to the CSS 2.1 test suite:

CSS 2.1 test suite (RC2; October 1st 2010):

CSS 2.1 test suite contributors:
Received on Tuesday, 5 October 2010 04:47:31 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:13:21 UTC