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

Re: cascade-precedence-001/002/003/004/005/006/007 invalid

From: Gérard Talbot <css21testsuite@gtalbot.org>
Date: Thu, 14 Oct 2010 18:07:21 -0700
Message-ID: <c36a8c21188ec3a79be760285aefa68c.squirrel@cp3.shieldhost.com>
To: "L. David Baron" <dbaron@dbaron.org>
Cc: "public-css-testsuite@w3.org" <public-css-testsuite@w3.org>

> The following tests:
> http://test.csswg.org/suites/css2.1/20101001/html4/cascade-precedence-001.htm
> http://test.csswg.org/suites/css2.1/20101001/html4/cascade-precedence-002.htm
> http://test.csswg.org/suites/css2.1/20101001/html4/cascade-precedence-003.htm
> http://test.csswg.org/suites/css2.1/20101001/html4/cascade-precedence-004.htm
> http://test.csswg.org/suites/css2.1/20101001/html4/cascade-precedence-005.htm
> http://test.csswg.org/suites/css2.1/20101001/html4/cascade-precedence-006.htm
> http://test.csswg.org/suites/css2.1/20101001/html4/cascade-precedence-007.htm
> http://test.csswg.org/suites/css2.1/20101001/xhtml1/cascade-precedence-001.xht
> http://test.csswg.org/suites/css2.1/20101001/xhtml1/cascade-precedence-002.xht
> http://test.csswg.org/suites/css2.1/20101001/xhtml1/cascade-precedence-003.xht
> http://test.csswg.org/suites/css2.1/20101001/xhtml1/cascade-precedence-004.xht
> http://test.csswg.org/suites/css2.1/20101001/xhtml1/cascade-precedence-005.xht
> http://test.csswg.org/suites/css2.1/20101001/xhtml1/cascade-precedence-006.xht
> http://test.csswg.org/suites/css2.1/20101001/xhtml1/cascade-precedence-007.xht
> are invalid because they make assumptions about the user-agent style
> sheet that:
>  * are not required by CSS


Those testcases have an undeniable value as far as testing if and how
cascading mechanisms have precedence (and prevail) over inheritance.

6.1.1 Specified values

Note that
"(...) the cascade mechanism of (user agent, author, user) style sheets
has precedence. (...)"
is clearly stated in the assert of those 7 testcases.

Now, webkit-based browsers use "text-align: auto" and gecko-based
browsers use "-moz-center-or-inherit" (and not text-align) and that is
the only problem with those 7 testcases.

Here's what I said on these testcases between square brackets in

Those testcases are correct as far as code, building logic, testcase
goals, etc. are involved. What is not expected, not predicted in
those testcases is that user agents may be using/relying on something else
th {text-align: center}
in their respective user agent stylesheet for centering table header cells.

CSS 2.1 provides a possible example of what I could do:

div {font-style: normal;}

<div><em>This text should be oblique, slanted</em></div>

"for visual browsers, the EM element in HTML is presented using an italic

but then again, there is no normative requirements for user agent
stylesheets in CSS 2.1, even for EM element.

I could do, as a replacement for those 7 testcases,

div {font-weight: normal;}

<div><b>This text should be oblique, slanted</b></div>

but then again, there is no requirement from CSS and any browser could
theoretically implement the B element without embolding the text of such

>  * contradict the requirements of WhatWG HTML5,

Those testcases declare HTML4 DTD in their doctype declaration; so WhatWG
HTML5 says is irrelevant as far as those testcases are involved.

which says, in
>    http://www.whatwg.org/specs/web-apps/current-work/multipage/rendering.html#alignment
>    # User agents are expected to have a rule in their user agent
>    # stylesheet that matches th elements that have a parent node
>    # whose computed value for the 'text-align' property is its
>    # initial value, whose declaration block consists of just a
>    # single declaration that sets the 'text-align' property to the
>    # value 'center'.
> These tests should probably be removed.

I am all for removing those testcases, ok? But now, you replace them
with what exactly? I still maintain that testing if and how cascading
mechanisms precede inheritance is worth a testcase or 2.

you rejected the testcase
for the correct reasons and based on user agent stylesheet having
precedence over inheritance: it assumed that border-collapse: separate
was not in the user agent style sheet.

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 Friday, 15 October 2010 01:07:57 UTC

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