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

RE: gtalbot /text-align-007 to 013 need correction

From: Gérard Talbot <css21testsuite@gtalbot.org>
Date: Wed, 12 May 2010 17:35:41 -0700
Message-ID: <b48e4f351ad9af8f6fbc87475bea99c3.squirrel@cp3.shieldhost.com>
To: "public-css-testsuite@w3.org" <public-css-testsuite@w3.org>
Cc: "Gabriele Romanato" <gabriele.romanato@gmail.com>, "Arron Eicholz" <Arron.Eicholz@microsoft.com>

> Gabriele Romanato wrote:
>> These testcases look more complicated that it could seem. First,
>> Gerard has
>> specified a declaration in his author stylesheet. The declaration
>> you've
>> mentioned is located in the UA default stylesheet.
>
> Author specified styles still have to deal with cascade. And the cascade
> is this
>
> tr (text-align: right (author style))
> th (initial style for 'text-align', inheritance happens, default styles
> are then applied. text-align: center, not specified in author styles)
>
> Inheritance only occurs when you do not have the property explicitly
> defined on child. Or when you explicitly use the 'inherit' keyword. In
> this case the UA stylesheet defines the style and therefore overwrites
> the inheritance.

Aaron,

I understand what you are saying and I'm convinced you are right.
Section 6.1.1 on Specified values
http://www.w3.org/TR/CSS21/cascade.html#specified-value
states that cascade occurs, cascade is applied before inheritance. And
inheritance occurs if the property is not specified somewhere in the
cascade of (user agent, author, user) style sheets.

The thing is that section 6.2 on Inheritance
http://www.w3.org/TR/CSS21/cascade.html#inheritance
should explicit this.


> If the 'text-align' was specified directly on the 'th' itself then the
> alignment on the 'th' would be overridden.
>
>> Now, inheritance should honor author or UA declarations? A th element
>> inherits direct from its parent element.
>
> Only if the values is its initial value not the default stylesheet
> value. In this case the style is defined by the default styles.
>
> Here is another example of how default styles come into play. The text
> in this case should be 'bolder' because the 'strong' has a definition
> (in the default styles) for 'font-weight'.
>
>         <style type="text/css">
>             div
>             {
>                 font-weight: normal;
>             }
>         </style>
>         <div>
>             <strong>Filler text</strong>
>         </div>


Your font-weight declaration versus <strong> example is excellent. I
think it should be in the section 6.2 of CSS 2.1, along with a bit of
explanations.

I will update soon the gtalbot/text-align-007 to 013 testcases accordingly.

I may later create a few other testcases based on your explanations here.

best regards, Gérard
-- 
Contributions to the CSS 2.1 test suite:
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

CSS 2.1 test suite (alpha 2; March 16th 2010):
http://www.w3.org/Style/CSS/Test/CSS2.1/20100316/html4/toc.html

CSS 2.1 test suite contributors:
http://test.csswg.org/source/contributors/
Received on Thursday, 13 May 2010 00:36:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 20 September 2010 17:52:01 GMT