This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 15387 - Not clear what 'inherit' on shorthand properties means
Summary: Not clear what 'inherit' on shorthand properties means
Status: NEW
Alias: None
Product: CSS
Classification: Unclassified
Component: CSS Level 2 (show other bugs)
Version: unspecified
Hardware: All Windows 3.1
: P2 normal
Target Milestone: ---
Assignee: Bert Bos
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-02 15:01 UTC by Anton P
Modified: 2012-12-04 00:52 UTC (History)
1 user (show)

See Also:


Attachments

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