evalica/xwiki-platform — comment on commit 5399fa928ea8d4611ff36ea466d6f8c39f44af1b
File: xwiki-platform-core/xwiki-platform-web/src/main/webapp/templates/colorThemeInit.vm line 48
By evalica:

Old themes or custom themes that don't have all the variables defined will use these variables instead.

I've used #FFFFFF for gradients and a blue for the primary button. Another solution would have been to use 'transparent' (but for the we need to fix http://jira.xwiki.org/browse/XE-961 first). Using 'transparent' would have been better for old/custom theme usage - but would look less nice when we rely just on the colorThemeInit.vm (like in the case we don't have any XAR imported). Right now the colorThemeInit.vm uses variables that creates a theme similar to ColorThemeTemplate (http://jira.xwiki.org/secure/attachment/24641/after.png)

Backward compatibility:
- all the new variables added in ColorThemeClass have a fallback value defined in colorThemeInit.vm
- if this fallback values don't look nice with the old/custom theme, the user needs to go to the ColorThemeWizard and adjust the following values:

$theme.fieldGradientColor - keep this value or give new value
$theme.buttonPrimaryGradientColor - copy from buttonPrimaryBackgroundColor or give new value
$theme.buttonSecondaryGradientColor - copy from buttonSecondaryBackgroundColor or give new value

$theme.panelHeaderGradientColor - copy from panelHeaderBackgroundColor or give new value
$theme.panelCollapsedGradientColor - copy from panelCollapsedBackgroundColor or give new value

$theme.menuGradientColor - copy from menuBackgroundColor or give new value
$theme.menuContentBackgroundColor - copy from menuBackgroundColor or give new value
$theme.menuContentLinkColor - copy from menuLinkColor or give new value
$theme.menuContentGradientColor - copy from menuBackgroundColor or give new value
$theme.submenuContentBackgroundColor - copy from menuBackgroundColor or give new value