jmozmoz wrote:CatThief wrote:Update:
Uh oh, spoke too soon. Looks like the option for flat buttons breaks things all over again. Oh well.
Do you know, what makes it so complicated? Is there a better way, I should organize the css classes for the add-on? I know that this part of the add-on is not very elegant
If a theme contains the exact code as the default theme for the headers, buttons, and other global elements as well, then there are no issues. Customized styling in themes is where support for extensions becomes complicated. With CompactHeader, virtually everything involving the buttons requires specialized code to override the theme defaults. I really like your extension and I want to include support for it because I know it will be very popular with a lot of users, but the amount of time required to apply the code has forced me to abandon support.
Here's what I would love to see if it is possible:
The extension would remove the existing #header-view-toolbar and replace it with one that has an ID of it's own, along with unique IDs and classes for the elements within the toolbar, then unique styling would be applied for things like button (including those for menus), button-box, and everything else that relates to appearance (border, background, hover, active, disabled, focus, etc.), very much like what you are doing now in the 1.1.0pre version for flat buttons. If you include -moz-appearance-none, you can style anything you like and at the same time enable cross-platform compatibility. Basically the extension would not even be involved with a theme's styling or be dependent on system styling, but instead use it's own styling based on its own unique IDs and classes.
It is a simple enough process for a theme to replace images by simply defining them by name and location. And if conflicts happen to arise with anything global, an exclusion can simply be added similar to using
button:not(.some-unique-class)I know this is a lot to absorb, and you have already put in an incredible amount of time on development, but hopefully at the very least you will give this some thought.
Thank you for taking the time to look this over.
-------------------------------------------
EDIT:
Another thought is perhaps you could assign a unique class to #header-view-toolbar. The class could be used as an exclusion inside the theme's messageHeader.css and will force the theme to use global defaults for buttons when when CompactHeader is installed. This would work well for themes that only apply specialized code to the headers and not to global/button.css. It wouldn't require much work on your end and it would provide us themers with better extension support options.
2nd EDIT:
I applied some modifications to the extension to test my theories. Unfortunately things didn't work as well as I had hoped.
Keep up the good work, jmozmoz!
Still passionate for Mozilla themes and extensions, just not actively developing them for public release anymore.