Bug 15387 - Not clear what 'inherit' on shorthand properties means
Not clear what 'inherit' on shorthand properties means
Status: NEW
Product: CSS
Classification: Unclassified
Component: CSS Level 2
unspecified
All Windows 3.1
: P2 normal
: ---
Assigned To: Bert Bos
public-css-bugzilla
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-02 15:01 UTC by Anton P
Modified: 2012-12-04 00:52 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anton P 2012-01-02 15:01:31 UTC
Reported by Øyvind Stenhaug

The spec is not clear about how a value of 'inherit' on a shorthand property is treated.  In particular the proposal in Bug 14420 for defining how 'inherit' is treated doesn't make sense for shorthand properties since it depends on knowing the computed value of the parent's shorthand property, a concept which is not well defined as per Bug 15384 (value assignment on shorthand properties is not well-defined).

It has been proposed to make it explicit in 6.2.1 (The 'inherit' value) [http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit] that setting 'inherit' on a shorthand is equivalent to setting 'inherit' on all the corresponding longhand properties; however, this doesn't actually solve the problem since that's the expected mechanism of shorthand properties in any case.

Rather, this bug is a special case of Bug 15384 in that the specified value of a shorthand property is not well defined in the case that the pre-cascade declared value of the property is 'inherit'.

Conversation begins:
Bug description:
http://lists.w3.org/Archives/Public/www-style/2011Oct/0473.html

Proposal: http://lists.w3.org/Archives/Public/www-style/2011Oct/0513.html
Comment 1 Kang-Hao (Kenny) Lu 2012-03-05 02:22:51 UTC
(In reply to comment #0)
> It has been proposed to make it explicit in 6.2.1 (The 'inherit' value)
> [http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit] that setting
> 'inherit' on a shorthand is equivalent to setting 'inherit' on all the
> corresponding longhand properties; 

There was a proposal from Tab[1], quoted here:

  | 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).

The only thing that worries me a little is the "specifying" there, which weakly implies "specified value" (this is silly, but well). I suggest s/specifying/setting/ or s/specifying/giving/ or something else. No strong opinion though.

[1] http://lists.w3.org/Archives/Public/www-style/2011Nov/0420