W3C home > Mailing lists > Public > www-style@w3.org > January 2012

Re: [css21] The 'inherit' keyword in shorthand properties

From: Anton Prowse <prowse@moonhenge.net>
Date: Mon, 02 Jan 2012 14:59:41 +0100
Message-ID: <4F01B84D.7060006@moonhenge.net>
To: www-style@w3.org
CC: fantasai <fantasai.lists@inkedblade.net>, Øyvind Stenhaug <oyvinds@opera.com>
On 14/10/2011 23:31, fantasai wrote:
> On 10/13/2011 08:13 AM, Øyvind Stenhaug wrote:
>> http://www.w3.org/2011/10/12-css-irc#T16-47-22
>>
>> "RESOLVED: accept TabAtkins and fantasai's proposal such that inherit
>> turns the specified value into the parent's computed value"
>>
>> I just realized that this doesn't necessarily make any sense for
>> shorthand properties. In fact, most of chapter 6 seems to
>> operate under an unstated assumption that each declaration setting a
>> shorthand has been converted to equivalent declarations
>> for the corresponding longhand properties.
>>
>> There is a sentence about how declaring a shorthand to be !important
>> is equivalent to declaring all of its sub-properties to
>> be !important. Probably there should be similar wording for 'inherit'.
>
> I suggest instead stating that unstated assumption so that this all works
> and we don't have to work out every missing detail.

Surely this is just a special case of setting /any/ value on a shorthand 
property?  If it's not clear from 1.4.3 (Shorthand properties)[1] that 
the mechanism works like that then I think we should solve that more 
general issue instead.  ("!important" is different because it's not a 
value.)

The problem that Øyvind raises with regards to the change proposal[2,3] 
is part of the wider problem that value assignment on shorthand 
properties is not well-defined.[4]  The proposal above doesn't solve 
that problem even in the case that Øyvind describes.

[1] http://www.w3.org/TR/CSS21/about.html#shorthand
[2] http://lists.w3.org/Archives/Public/www-style/2011Oct/0482.html
[3] http://www.w3.org/Style/css2-updates/REC-CSS2-20110607-errata.html
[4] https://www.w3.org/Bugs/Public/show_bug.cgi?id=15384

Cheers,
Anton Prowse
http://dev.moonhenge.net
Received on Monday, 2 January 2012 14:00:11 GMT

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