- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Tue, 18 Dec 2012 20:27:28 -0800
- To: "L. David Baron" <dbaron@dbaron.org>
- Cc: François REMY <francois.remy.dev@outlook.com>, www-style list <www-style@w3.org>
On Tue, Dec 18, 2012 at 2:15 PM, L. David Baron <dbaron@dbaron.org> wrote: > So http://dev.w3.org/csswg/css3-cascade/#cascade currently says: > > # Normal declarations from style attributes are considered to be > # scoped to the element with the attribute, whereas important > # declarations from style attributes are considered to be scoped > # to the root element. [CSSSTYLEATTR] > # > # This odd handling of !important style attribute declarations is to > # match the behavior defined in CSS Levels 1 and 2, where style > # attributes simply have higher specificity than any other author > # rules. [CSS21] > > This odd handling of !important style attribute declarations seems > *inconsistent* with CSS Levels 1 and 2. I think it would be > consistent if all declarations from style attributes were scoped to > the element with the attribute. It's just re-reverses the reversal that scoping does. Note that scoped !important rules resolve in reverse order, with ancestors beating descendents, to match with the way that origins mostly run in reverse order when !important. Since !important style rules *don't* reverse relative to author !important rules, they have to be re-reversed. ~TJ
Received on Wednesday, 19 December 2012 04:28:16 UTC