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

[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: Tue, 17 May 2011 12:44:50 -0700
Message-ID: <0e2134488a4e58f417dc8b5e65ba3af8.squirrel@cp3.shieldhost.com>
To: "W3C style mailing list" <www-style@w3.org>

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:


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.

"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:


  <style type="text/css">
   body { border-width: 2em; }
   p { border-width: inherit; border-style: solid; border-color: red;
color: green; }
  <p>This line should be green with no red present.</p>

The specified border-width value of <p>'s parent (which is <body>) is 2em.
The computed border-width value of <p>'s parent is 0 because border-style
is 'none'.

So, with the previous definition, a value of 0 was inherited but now, it
seems that UA should apply a 2em value to p's border width.

Can someone explain all this? What am I missing?

I searched the list of issues
and did not find anything related to section 6.2.1.

regards, Gérard
[1]: http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit
[2]: 20101207 WD:
CSS 2.1 Test suite RC6, March 23rd 2011

Contributions to CSS 2.1 test suite

Web authors' contributions to CSS 2.1 test suite
Received on Tuesday, 17 May 2011 19:45:19 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:00 UTC