Re: [css-syntax] Duplicate declarations in style rules

On Mon, 12 Aug 2013 09:32:50 +0200, Simon Sapin <simon.sapin@exyr.org>  
wrote:

> Le 12/08/2013 08:22, John Daggett a écrit :
>>>     .bar {
>>>       margin: 1em;
>>>       margin-left: 0;
>>>     }
>>>
>>> Here, even though no two specified declarations have the same name,
>>> there is still some duplication in the longhands: the 'margin-left:
>>> 1em' declaration implied by the shorthand is ignored.
>> Sorry, I'm not seeing the need to distinguish longhand/shorthand here.
>> The resulting effect may be that the implied value for 'margin-left'
>> is different from what is implied by 'margin: 1em' but the spec
>> wording only seems to be talking about multiple declarations of the
>> same property, regardless of whether it's a shorthand or a longhand.
>
> Yes, exactly. And I think that wording is incorrect.
>
> Per the wording in the current ED, there is no duplication here because  
> the two declarations do not have the same name. But the fact is there is  
> some duplication and implementations do drop the "expanded"  
> 'margin-left: 1em' declaration.

Indeed. This is observable in the CSSOM, and hence I need this to spec it  
properly in CSSOM.

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2440

Also note the order of the declarations and compare with

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2441

-- 
Simon Pieters
Opera Software

Received on Monday, 12 August 2013 07:51:50 UTC