Skip to content

Commit 84c2d33

Browse files
bert-githubgsnedders
authored andcommitted
[CSS2] inherit should use computed, not specified, value
Fixes w3c#2768. From https://lists.w3.org/Archives/Public/www-style/2011Oct/0482.html: - RESOLVED: Fix wording in CSS2.1 sections 6.2.1 and 6.1.1 to say that 'inherit' causes the property's specified value to be its parent's computed value. http://www.w3.org/Bugs/Public/show_bug.cgi?id=14420 Originally fixed in 2aa48e8 and ab60bee. Co-authored-by: Sam Sneddon <me@gsnedders.com>
1 parent b96b58f commit 84c2d33

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

css2/Overview.bs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4428,6 +4428,8 @@ on the following mechanisms (in order of precedence):</p>
44284428

44294429
<ol>
44304430
<li>If the <a href="#cascade">cascade</a> results in a value, use it.
4431+
Except that, if the value is ''inherit'', the specified value is defined
4432+
in [[#value-def-inherit]] below.
44314433
<li>Otherwise, if the property is <a href="#inheritance">inherited</a> and the element is not the root of the <a>document tree</a>, use the computed value of the parent element.
44324434
<li>Otherwise use the property's <dfn>initial value</dfn>. The initial value of each property is indicated in the property's definition.
44334435
</ol>
@@ -4537,8 +4539,8 @@ not intercepted by <a data-lt="" href="#box-gen">anonymous boxes.</a>
45374539
value</h4>
45384540

45394541
<p>Each property may also have a cascaded value of ''inherit'', which
4540-
means that, for a given element, the property takes the same specified
4541-
value as the property for the element's parent. The ''inherit'' value
4542+
means that, for a given element, the property takes as specified
4543+
value the computed value of the element's parent. The ''inherit'' value
45424544
can be used to enforce inheritance of values, and it can also be used on
45434545
properties that are not normally inherited.
45444546

0 commit comments

Comments
 (0)