Re: [css21] Revising the definition of the 'inherit' keyword

On Sat, Nov 19, 2011 at 6:27 PM, Bjoern Hoehrmann <derhoermi@gmx.net> wrote:
> * Tab Atkins Jr. wrote:
>>Sveral telcons ago we discussed the definition of the 'inherit'
>>keyword in the 2.1 spec, and agreed to change it to be better in line
>>with what CSS3 Cascade says.  Here's my attempted edit:
>
> If you allow me a quick meta remark: in order to review your proposal I
> would have to locate the current version of CSS 2.1 and CSS 3 Cascade,
> find the corresponding sections there, find the precise text you refer
> to, and then compare them side by side to properly review the proposal.
>
> If you had provided proper links to the relevant texts and quoted the
> old text in addition to your revision, I could review this in place. It
> is much more likely that problems are spotted early in the latter case.

The 2.1 text is easy to find, since I provided section numbers and
all.  I can provide the old text inline, though:

6.1.1 old text:

1. If the cascade results in a value, use it.
2. Otherwise, if the property is inherited and the element is not the
root of the document tree, use the computed value of the parent
element.
3. Otherwise use the property's initial value. The initial value of
each property is indicated in the property's definition.

Proposed 6.1.1 new text:

1. If the cascade results in a value other than 'inherit', use it.
2. Otherwise, if the property is inherited or the cascade resulted in
the value 'inherit', and the element is not the root of the document
tree, use the computed value of the parent element.
3. (unchanged)


6.2.1 old text:

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 'inherit' value can be
used to enforce inheritance of values, and it can also be used on
properties that are not normally inherited.

Proposes 6.2.1 new text:

Each property may have a cascaded value of 'inherit', which means
that, for a given element, the specified value of the property is the
computed value of the property on the element's parent.  If 'inherit'
is given as a value to a shorthand property, it has the same effect as
specifying 'inherit' for all of the longhand properties that the
shorthand represents (even if the combined computed values of the
longhand properties end up being an invalid value for the shorthand).

These changes have two effects.  First, they make 'inherit' disappear
by specified-value time.  Second, they make the effect of 'inherit' on
shorthand properties explicit in the same way that !important
declarations are treated.

~TJ

Received on Wednesday, 23 November 2011 00:12:04 UTC