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

> 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 UTC