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

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

From: John Daggett <jdaggett@mozilla.com>
Date: Mon, 12 Aug 2013 00:22:03 -0700 (PDT)
To: www-style@w3.org
Message-ID: <1332468691.2596427.1376292123123.JavaMail.zimbra@mozilla.com>
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

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