W3C home > Mailing lists > Public > www-style@w3.org > August 2013

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

From: Simon Sapin <simon.sapin@exyr.org>
Date: Mon, 12 Aug 2013 08:32:50 +0100
Message-ID: <52088FA2.3080200@exyr.org>
To: www-style@w3.org
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.

-- 
Simon Sapin
Received on Monday, 12 August 2013 07:33:13 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:33 UTC