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

Simon Sapin wrote:

> Ok, two examples:
> 
>    .foo {
>      color: green !important;
>      color: red;
>    }

Ok, I see your point here.

> In this case, the declaration that is kept (with the greatest cascading
> order) is not the last.
> 
> 
>    .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.

Seems like the only thing that's needed is a slight tweak to say "same
name and importance" or whatever the best way to say that is.

Cheers,

John Daggett

Received on Monday, 12 August 2013 07:22:29 UTC