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

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

From: Arron Eicholz <Arron.Eicholz@microsoft.com>
Date: Wed, 12 May 2010 21:00:26 +0000
To: Gabriele Romanato <gabriele.romanato@gmail.com>
CC: "public-css-testsuite@w3.org" <public-css-testsuite@w3.org>, "css21testsuite@gtalbot.org" <css21testsuite@gtalbot.org>
Message-ID: <651D2A831D17C040B828D62270386CE93EA16FEC@TK5EX14MBXC135.redmond.corp.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.

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">
                font-weight: normal;
            <strong>Filler text</strong>
Received on Wednesday, 12 May 2010 21:01:00 UTC

This archive was generated by hypermail 2.4.0 : Friday, 20 January 2023 19:58:14 UTC