[css3-background] Negative border-width should be clearly disallowed (was: [CSS21] WD 8.5.1: negative borders (presumed editorial))

4.3. Line Thickness: the ‘border-width’ properties

The spec now says:

  # The <length> may not be negative.

which appears (at least to me) to say that a conforming UA can
optionally support negative border-width, although nowhere in the spec
says how such a value should be handled.

This legacy sentences seems to originate from css3-box[1], where there
is also an informative note saying:


Note that the margin, unlike the border and padding, may have a negative
thickness. That is one way to make adjacent boxes overlap each other.


This, on the other hand, indicates that it is not possible to have
negative border width, and hence sightly contradicts the normative
"may not" sentence.

CSS2.1's "Explicit border widths cannot be negative." is no better.
Peter Moulder raised concern about this[2] but there wasn't a response
to his concern. Currently tests in CSS2.1 related to negative border
width are all marked as invalid presumably because of this sloppy
sentence (am I right? From the system I couldn't find the reason why
they are marked invalid).

All browsers interoperably treat negative border-width as invalid. Opera
didn't have testing results for some of the border-top-width-* tests
that use negative width (i.e. 012, 023, 034, 056, 067, 078)[3], although
these tests all pass in Opera12alpha.

In summary, I suggest we just say

  | Negative values are not allowed.

(I am for this change in CSS2.1 too)

[1] http://www.w3.org/TR/css3-box/
[2] (the mail this mail replies to)
[3] http://test.csswg.org/harness/results/CSS21_DEV/section/8.5.1/


Received on Monday, 5 March 2012 22:47:43 UTC