jquery/web-jquery-mobile-theme-roller — Issue #35: Default swatches are hard referenced 
Author: CodeOfficer
Created: 2011-11-04 06:39:18+00:00
State: open

Default swatches are hard referenced throughout the source and may not exist after generating a new theme file with ThemeRoller.

The site recommends to build themes with at least 3 swatches (A-C) but there are references to at least 4 (A-D) in the source. Since ThemeRoller generates new swatches starting at A, swatch names will overlap with the hard coded defaults. I suspect original reason behind default swatches was to demonstrate specific levels of contrast between things like pages and dialogs, but who's to say another user's swatches will adhere to that same pattern.

Perhaps a solution is to let a user name their own swatches right in the generator? That also might facilitate combining swatches later on from multiple themes.

Now that ThemeRoller is out, it seems like an ideal assumption might be that there are only 1+ swatches in a theme and not 3+.

Examples from the source ...
$.mobile.page.prototype.options.headerTheme = "a";
$.mobile.page.prototype.options.footerTheme = "a";
$.mobile.listview.prototype.options.theme = "c";
$.mobile.listview.prototype.options.countTheme = "c";
$.mobile.listview.prototype.options.headerTheme = "b";
$.mobile.listview.prototype.options.dividerTheme = "b";
$.mobile.listview.prototype.options.splitTheme = "b";
$.mobile.dialog.prototype.options.theme = "a";
$.mobile.collapsible.prototype.options.iconTheme = "d";
... etc ...