W3C home > Mailing lists > Public > www-style@w3.org > May 2011

Re: [CSS21] [Section 6.2.1] inherit keyword versus specified value instead of computed value of its parent's property

From: Gérard Talbot <www-style@gtalbot.org>
Date: Wed, 18 May 2011 13:08:25 -0700
Message-ID: <fb2276f82f12ced822710ceba69ddd50.squirrel@cp3.shieldhost.com>
To: "Øyvind Stenhaug" <oyvinds@opera.com>
Cc: "W3C style mailing list" <www-style@w3.org>

Le Mer 18 mai 2011 4:56, Øyvind Stenhaug a écrit :
> On Tue, 17 May 2011 21:44:50 +0200, Gérard Talbot <www-style@gtalbot.org>
> wrote:
>
>> The Proposed Recommendation of CSS 2.1 changed important words in
>> section
>> 6.2.1 [1], which are highlighted in green and red+striken in C.8.49:
>>
>> http://www.w3.org/TR/CSS21/changes.html#q543
>>
>> My question relates to this sentence:
>>
>> "
>> Each property may also have a cascaded value of 'inherit', which means
>> that, for a given element, the property takes the same specified value
>> as
>> the property for the element's parent.
>> "
>> http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit
>>
>> "the property takes the same computed value" [2]
>> has been replaced with
>> "the property takes the same specified value" [1]
>> which makes a huge difference. Consider now this test:
>>
>> http://test.csswg.org/suites/css2.1/20110323/html4/border-width-011.htm
>
> It already says further up that "When inheritance occurs, elements inherit
> computed values. The computed value from the parent element becomes both
> the specified value and the computed value on the child".

IMO, all they had to do here is insert in the sentence an exception about
the 'inherit' keyword and leave everything elsewhere as it was.

e.g.
"
The computed value from the parent element becomes both the specified  
value and the computed value on the child.
"

would become (suggestion)

"
The computed value from the parent element becomes both the specified  
value and the computed value on the child, except when inherit keyword is
used in which case the specified value on the child is inherit and the
computed value of the child is the computed value of its parent.
"

or something like that...

> I think the
> intention might be that the <p> in that test gets 2em as specified value
> for 'border-width'

That seems contradictory, illogical.
And no webpage debugger does that. The specified value for the <p>'s
border-width is inherit in Firefox DOM inspector, Opera DragonFly,
webkit's web inspector. None of them give 2em as specified value.

> and 0 as computed value. Even so, that seems a little
> strange and not very clear from the spec.
>
>> I searched the list of issues
>> http://wiki.csswg.org/spec/css2.1
>> and did not find anything related to section 6.2.1.
>
> http://wiki.csswg.org/spec/css2.1#issue-259

Good catch! I missed that.

regards, Gérard

>
>> [1]: http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit
>> [2]: 20101207 WD:
>> http://www.w3.org/TR/2010/WD-CSS2-20101207/cascade.html#value-def-inherit
>
> --
> Øyvind Stenhaug
> Core Norway, Opera Software ASA
>
>


-- 
CSS 2.1 Test suite RC6, March 23rd 2011
http://test.csswg.org/suites/css2.1/20110323/html4/toc.html

Contributions to CSS 2.1 test suite
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

Web authors' contributions to CSS 2.1 test suite
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/web-authors-contributions-css21-testsuite.html
Received on Wednesday, 18 May 2011 20:08:56 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:40 GMT