- From: L. David Baron <dbaron@dbaron.org>
- Date: Tue, 17 Feb 2004 14:37:33 -0800
- To: www-style@w3.org, fantasai@escape.com
On Monday 2003-10-20 12:09 -0400, fantasai wrote: > S6.2: Inheritance > > # 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. > ... > # Each property may also have a specified value of 'inherit', which > # means that, for a given element, the property takes the same > # computed value as the property for the element's parent. > > There's a dichotomy in how the "specified value" for inherited values > works, depending on whether it's explicit or implied. It would be best > if the initial behavior of 'color' and "color: inherit" meant exactly > the same thing. And this way the meaning of "color: inherit" on the > root element would follow from the inheritance logic without having to > be handled as another exception. The working group doesn't want to change this at this time. The rules on how inheritance applies to specified and computed values can have complicated effects and have been checked to ensure that they lead to the outcome we expect. In particular, these rules have not been modified since CSS2. My original proposal for changing the way computed values work actually removed this dichotomy -- it made the specified value always be the computed value of the parent, which seemed rather ugly, but I wanted to avoid having to deal with 'inherit' in every "Computed Value:" line. However, someone else came up with a better solution in what's now the third paragraph of section 6.1.2 [1]. If we were to fix this now, I'd much prefer making the specified value consistently be 'inherit'. This would require, at a minimum, changes to 6.1.1 and 6.2.1. However, the changes to 6.2.1 would introduce another inconsistency that couldn't be fixed until CSS3 -- an inconsistency between the second and third bullets in 6.1.1. (CSS3's 'initial' value could be used in the third bullet point.) Since this change doesn't fix any real problems and is the type of change that might introduce inconsistencies in other parts of the spec that we won't find for a long time, I think it's better not to make the change. -David [1] http://www.w3.org/TR/2003/WD-CSS21-20030915/cascade.html#computed-value -- L. David Baron <URL: http://dbaron.org/ >
Received on Tuesday, 17 February 2004 17:37:41 UTC