w3c / publ-cg

EPUB 3 Community Group Repository
Other
44 stars 16 forks source link

[Spec] 4.5 Reading System Overrides #13

Open JayPanoz opened 7 years ago

JayPanoz commented 7 years ago

While implementing Readium CSS, I came across “4.5 Reading System Overrides”, especially the following:

the getOverrideStyle method [DOM2 Style]

There is currently an open issue about override declarations on CSSWG-draft. Apparently, it’s never been implemented and is very likely to be dropped in CSS Cascade.

JayPanoz commented 7 years ago

I was also wondering if an explicit link to CSS Cascading and Inheritance Level 3 would be useful as the order is way more complex than authors usually expect.

  1. Transition declarations [CSS3-TRANSITIONS]
  2. Important user agent declarations
  3. Important user declarations
  4. Important override declarations [DOM-LEVEL-2-STYLE]
  5. Important author declarations
  6. Animation declarations [CSS3-ANIMATIONS]
  7. Normal override declarations [DOM-LEVEL-2-STYLE]
  8. Normal author declarations
  9. Normal user declarations
  10. Normal user agent declarations

Indeed, !important completely changes the order or priority.