Tue, 02 Aug 2011 02:04:06 +0200, /Tony Mechelynck/:

As a rule of thumb, I recommend to always have the DOM Inspector
ready when adding rules to userChrome.css or userContent.css — that
tool lets you know easily which CSS rules apply where. No need to
retrieve and analyse the full text of all the separate style sheets
which may be cascaded over any data or chrome element.

Whatever you do, if your content pages or your chrome evolve,
someday your CSS rules are going to break: I take that as a fact of
life...

I use the DOM Inspector extensively. It proves my use case even better. When I look at an element I want to override the styling for, I may see the following rule (in DOM Inspector):

  .important {
    color: red;
  }

Then if I don't look at the full author style sheet I'll place in my user style sheet:

  .important {
    color: inherit !important;
    font-weight: bolder;
  }

And this will additionally override author styles like:

  .important:hover {
    color: green;
  }

  .important.other {
    color: blue;
  }

which I don't really want. If I could register a user/custom style with author cascading order, at the end of the author specified sheets, like:

  .important {
    color: inherit;
    font-weight: bolder;
  }

I know I'll override just the first rule. If the author styles further evolve in a way the given rule does not have any effect anymore - it's great. I'll probably don't need it, or I may need to override completely different rule. However having the user rule like:

  .important {
    color: inherit !important;
    font-weight: bolder;
  }

will continue to mess with the evolving author styles like:

  .important.special {
    color: blue;
  }

even if I've been smart enough to initially put in my user style sheet rule like:

  .important:not(:hover):not(.other) {
    color: inherit !important;
  }
  .important {
    font-weight:  bold
  }

--
Stanimir
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout

Reply via email to