W3C home > Mailing lists > Public > public-css-testsuite@w3.org > September 2011

Re: [CSS3-mediaqueries]: Invalid test cases in test suite

From: Alan Gresley <alan@css-class.com>
Date: Thu, 29 Sep 2011 14:41:51 +1000
Message-ID: <4E83F70F.5060509@css-class.com>
To: Boris Zbarsky <bzbarsky@MIT.EDU>
CC: public-css-testsuite@w3.org
On 29/09/2011 6:23 AM, Boris Zbarsky wrote:
> On 9/28/11 4:13 PM, Arron Eicholz wrote:
>> CSS 2.1 still doesn't cover 0 exactly. What is 0?
>
> The CSS 2.1 spec says its numbers are real numbers.
>
> Typical fairly equivalent definitions of 0 would then include:
>
> * The smallest element of the subset of the real numbers called the
> "Natura numbers".
> * The additive identity in the field structure of the real numbers.
> * "That thing defined in the first Peano axiom."
>
> and so forth. As in, this is the zero you learned about in grade school;
> nothing magic about it.

This is what I would expected but the wording in the spec is a surprise 
to me.

>> Since -0 is equivalent to 0 and is not a negative number that
>> completely explains -0. It does not however explicitly explain what 0
>> or +0 is or isn't. We must therefore draw the conclusion that +0 is
>> positive and 0 can be both positive and negative.
>
> I have no idea what you're talking about here.

Testing.

-0 = 0 = +0

100px = +100px

My question is why implementations would allow something like 
margin-left: +100px in the first place?

-100px is a negative number but does not equal 100px or +100px.

>> We need explicit text explaining this
>
> How much more explicit than "these are real numbers" can you get? Or do
> you want the CSS spec to include some subset of the field axioms for the
> reals, enough to prove that +0 == 0 == -0 (using the usual definitions
> of unary + and - for the reals, which would likewise need to be included
> in the CSS spec)?

I hope not since that would mean including all positive and negative 
numbers to infinity with a extra subset (or sub equation) for all 
negative numbers like so.

-100px (+100px x 2) == 100px == +100px

or

-nIDENT (+nIDENT x 2) == nIDENT == +nIDENT

> We can explicitly say that -0 == 0 == +0, of course, as an informative
> note or something, if you think that makes things clearer for people who
> are unfamiliar with the term "real number"....
>
> -Boris

I would recommend removing all of this.

   # Both integers and real numbers may be preceded by
   # a "-" or "+" to indicate the sign. -0 is equivalent
   # to 0 and is not a negative number.

And replacing it with this:

   | All negative integers and negative real numbers are
   | preceded by a "-" to indicate the sign. All other
   | integers and real numbers have no sign.


I see not reason for the '+' sign and zero is just zero.

http://en.wikipedia.org/wiki/0_(number)


-- 
Alan Gresley
http://css-3d.org/
http://css-class.com/
Received on Thursday, 29 September 2011 04:42:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 29 September 2011 04:42:44 GMT