I'm starting this discussion related to this bug: Bug 659407 - Remove
duplicate theme files
Since that bug is closed I think the best is to write here... I have
just a suggestion:
Some time ago, when we've begun to differentially support Windows 7
and Vista, I was quite disappointed with the solution that was
implemented. This solution resulted in the repetition of thousands of
lines of code and dozens of images.
After investigating this issue, I came to a concept that seems much
more reasonable, IMHO. I've described and discussed this solution at
MozillaZine:
http://forums.mozillazine.org/viewtopic.php?f=18&t=906535
The solution is quite simple. It consists in registering a skin-only
package, which I called os_target, containing directories that host
images and different codes for the various operating systems. Through
manifest flags is possible to register these directories differently
according to the operating system. Via @import rules we can insert
everything that is different into files that contain the common code.
This approach has been used by me and several other developers for
nearly three years with great success.
I do not have exact measurements, but I believe the Winstripe could be
decreased by approximately 40%, and if we think that this method
allows us to develop a single theme for all operating systems, we can
have an idea what this mean in terms of maintenance and size of the
source.
What do you think?