Tue, 02 Aug 2011 22:16:09 +0300, /Stanimir Stamenkov/:
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...

While I've mainly spoken for Web content, here's and example targeting chrome:

https://bugzilla.mozilla.org/show_bug.cgi?id=539765 (see https://bugzilla.mozilla.org/show_bug.cgi?id=512462 also)

Now I have the following rules in my "userChrome.css":

statusbar, tab, treecol, toolbarbutton { color: ButtonText !important; }
toolbarbutton[disabled=true] { color: GrayText !important; }

This unwanted overrides and clashes with colors set by certain Personas, and "disables" the dynamic label colors of ChatZilla tabs (indicating new messages have appeared in the channel, etc.). If I could just "overlay" the original sheet, as if my rules were the original ones - whole lot of problems get solved.

For the above problem I'm preparing extension employing chrome overrides (as I can't possibly specify overlay style sheet for any possible document, or can I?), but this will require I override whole style sheets (like <chrome://global/skin/global.css>, <chrome://global/skin/tabbox.css>) and then I'll have to monitor and update them in the extension whenever unrelated style rule (such I haven't customized) changes appear in them.

May be I could have not hit this particular problem if sheets such as <chrome://global/skin/global.css> and <chrome://global/skin/tabbox.css> were registered as having UA origin, but this is probably another topic.

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

Reply via email to