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

[css-syntax] Duplicate declarations in style rules

From: Simon Sapin <simon.sapin@exyr.org>
Date: Mon, 12 Aug 2013 07:27:16 +0100
Message-ID: <52088044.2030906@exyr.org>
To: www-style@w3.org

8.1 Style rules of css-syntax says:
> If a style rule contains multiple declarations with the same name,
> all but the last such declaration are discarded.

Its actually not that simple:

If a style rule contains multiple declarations for the same longhand 
property after shorthand expansion [refer to CSS Cascade], all but the 
one with greatest cascading order [refer to CSS Cascade] are discarded.

   Note: within one style rule, the relative cascading order is 
determined only by '!important', then source order.

(BTW, is "cascading order" a term that should have a <dfn> in Cascade?)

Simon Sapin
Received on Monday, 12 August 2013 06:27:40 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:30 UTC