From MozillaWiki
Jump to: navigation, search

In a discussion at the last all-hands meeting, mconnor, bsmedberg, and myself (vladimir) came up with a suggestion for making XUL CSS styling/themeing more sane for Gecko 1.9.


Currently, the default "xul.css" includes no style rules -- it sets up basic xbl bindings, some event handling widget tweaks, and the like. Each individual theme needs to style *all of XUL* to make it look like XUL. This isn't all that useful, and it also means that simple XUL apps/pages look horrible unless they include the magic "global skin" CSS import.


The suggestion is to move the current default theme into chrome, and allow user-installed themes to simply override the bits that they want to override via the normal CSS cascade. This means that a basic XUL document would still look like some sort of generic "XUL", but without a theme. This would also remove gobs of duplicated code in the various themes (e.g. 90% of identical content between winstripe and pinstripe, if we choose that as the base 'default'), as well as making life easier for theme authors (their themes won't break when some tweak/change to XUL happens).


Pick a default theme style and move it into some chrome CSS file, e.g. xul-base.css. Rework the current themes to just override the things that are different (different icon sets, some different widget fonts between platforms, etc.).