The skinning system allows you to easily change the appearance of ZWC, for example, to use the logo and colors of your company or institution. You can create many different skins to provide your users with choices for the appearance of the application, or you can restrict users to a single skin to enforce brand identity.
At a fundamental level, the skinning system all comes down to HTML and CSS files, since that is how the browser styles elements on a web page. The main purpose of the skinning system is to simplify working with the large number of CSS files in the ZWC app. We try to follow the DRY (Don't Repeat Yourself) Principle -- by specifying the appearance of the app logically and then making that work throughout the CSS. By changing a few settings, you can easily change many details in the ZWC's appearance.
What this means in practice is that your skin specifies a number of Skin Variables (in Skin Property Files) which are then compiled into the HTML and CSS files that make up the application.
The default ZWC installation comes with several themes, which you can use as the basis of your own themes. As of the time of this writing, they are:
See Getting Help for help in accomplishing these tasks if necessary.
For example, to create our pumpkin theme, we'll use the following values:
AppC = #fec855 AltC = #ddbc76 SelC = #ffffcc
LogoImgDir = /zimbra/skins/@SkinName@/logos LogoURL = http://www.yourcompany.com
cd /opt/zimbra/jetty/webapps/zimbra/skins/ zmskindeploy pumpkin/
All of the skins for your install of ZWC live inside the .../zimbra/skins/ directory, each skin in a separate sub-directory. For example, the "beach" skin lives in the directory .../zimbra/skins/beach/. We will refer to this below as the skin directory. See Locating the Skin Files for how to find this in your system.
Note that some skins reference files in other skin directories to avoid duplication of files -- in particular, many skins reference the .../zimbra/skins/_base/base2 directory, where the common files for most skins live.
A skin is composed of some or all of the following files:
| File Type | Example | Purpose |
|---|---|---|
| Skin Manifest | manifest.xml | tells the application which files comprise this skin |
| Skin Property Files | skin.properties | the primary controller of the appearance of the skin |
| Skin CSS Files | skin.css | (optional) overrides standard application CSS definitions |
| Skin HTML Files | skin.html | (optional) used to lay out the Skin Zones |
| splash.html | (optional) Splash Screen, shows when app first launches | |
| Skin JS Files | skin.js | (optional) provides custom javascript for the skin. |
| logo images | logos/AppBanner.png logos/LoginBanner.png |
(optional) Logos for the splash screen and "banner" graphic at the top-left of the application. See Changing Logos. |
| custom icons and graphics | img/... | (optional) Custom images, for example, background graphics for the different skin zones or custom icons. See Applying Background Images and Changing Icons. |
| skin templates | templates/widget.template | (optional) Custom HTML templates for widgets or many application screens. See Working with Templates. |
| message files | messages/ZmMsg.properties | (optional) 'Messages' are labels and prompts that are shown in the application. See Working with Message Files. |
Below is the manifest for the default beach skin:
The manifest.xml file is divided into three sections:../_base/base2/skin.properties skin.properties ../_base/base2/skin.css ../_base/base2/skin.html ../_base/base2/splash.html ../../css/zhtml.css
You specify your skin properties file in your manifest like so:
Note that this examples loads two properties files:... ...... ../_base/base2/skin.properties skin.properties
A skin properties file looks something like this:
# I am a Property File Comment SkinName = MySkin SkinVersion = 2 TreeColor = #f9f6f0 TreeStyle = background-color:@TreeColor@; ToolbarColor = @darken(TreeColor,30)@ # Fix non-standard IE syntax #IFDEF MSIE DisabledOpacity = filter:alpha(opacity=40); #ELSE DisabledOpacity = opacity:0.4; #ENDIFThere are three types of lines in a skin properties file:
= sign specifies the value of the variable. The value of a variable can
come wholly or in part from an expansion of another variable:
Also, note that it is possible to define the same variable more than once in two properties file, or even within the same properties file using Property File Directives -- in this case, the definition that is loaded last will "win" or override. This ensures that definitions in your skin will take precedence over the standard ones in the base properties file.
For a concrete example, say we wanted to set the background color for the Tree on the left side of the application, we'd set the following:
TreeColor = #f9f6f0 TreeStyle = background-color:@TreeColor@;This creates two skin variables: TreeColor and TreeStyle. In any HTML, CSS or skin properties file that uses this skin, you can use the Skin Replacement @TreeColor@ as a shorthand for the value #f9f6f0 and @TreeStyle@ to mean background-color:#f9f6f9;.
Note in this example that the replacement value in TreeStyle has the TreeColor replacement in it -- this is a common pattern, to define a value once and then use it in other skin variables later within the same properties file.
The tree color would manifest in your application via a CSS file, in this case skin.css where a CSS definition would reference the TreeStyle variable:
...
.skin_container_tree { @TreeStyle@ }
...
In this way, the skin variables in your skin.properties file directly affect the CSS files that ZWC
serves to the users. See sections Skin Zones, Widget Appearance, Working with Fonts and Working with Images
for info about using specific skin variables.
Why would you want to use skin variables, why wouldn't you just hard-code the value of #f9f6f0?
Looking again at the expanded example above, note that we define:
... TreeColor = #f9f6f0 ... ToolbarColor = @darken(TreeColor,30)@ ....
This indicates that the toolbars in the application should be a darker shade of the TreeColor defined above. The skinning system is set up so that you can change a couple of variables (TreeColor in this case) in the skin.properties file and have that change ripple out through the rest of the application. You are free to break this pattern as you like, for example if you wanted your Toolbars to be a shade of blue, you could define:
... TreeColor = #f9f6f0 ... ToolbarColor = #bccbd6 ....You can have any value you like as long as the format of your Skin Variable matches that of the pre-defined one (e.g., if a color was specified, you specify a color, etc).
A few more notes on properties files:
TreeStyle = background-color:@TreeColor@; \ border:1px solid black;
Remember that Skin Variables can be defined more than once (e.g. in different files) and that the last occurance of the skin variable is the one that will be displayed. This ensures, for example, that your definition of a Skin Variable will override the one defined in the base properties file.
Note that a color variable below can be in any of the following forms:
| Function | Description |
|---|---|
| @darken(color, percentage)@ | Darkens color by specified percentage. Functon arguments:
|
| e.g. @Darken(#000000, 20)@ == #cccccc | |
| @lighten(color, percentage)@ | Lightens color by specified percentage. Functon arguments:
|
| e.g. @lighten(black, 20)@ == #666666 | |
| @border(size, type, color)@ | Outputs CSS to create a border that looks the same on different browsers. This is necessary
because the CSS borders created by Internet Explorer and Firefox treat colors differently, making
it impossible to do a simple CSS border that looks the same on both browsers.
Also, this correctly handles "transparent" borders. Functon arguments:
|
| e.g. @border(1px,outset,#cccccc)@ or
@border(1em,transparent)@ |
|
| @img(dir, name, width, height, repeat)@
or @image(dir, name, width, height, repeat)@ |
Outputs CSS to show an image as a background-image of an element. This is necessary
to output semi-transparent .png images correctly in older versions of Internet Explorer.
Functon arguments:
|
e.g. @image(SkinImgDir, background.png, 100, 100, repeat)@ ==
|
|
| @cssShadow(size, color)@ | Outputs CSS to draw a shadow underneath an element. Currently only supported in Safari 3+ --
for other browsers, outputs nothing. Functon arguments:
|
e.g. @cssShadow(10px, red)@ ==
|
|
| @roundCorners(size)@
or @roundCorners(TL, TR, BR, BL)@ | Outputs CSS to round corners in a cross platform way. Works in Firefox and Safari 3+, does not work in Internet Explorer.
Functon arguments:
|
e.g. @roundCorners(3px)@ ==
|
|
| @opacity(percentage)@ | Cross-platform method to specify opacity (compensating for non-standard specification in MSIE). Function argument:
|
e.g. @opacity(45)@ ==
|
|
| @cssValue(variable, property)@ | Returns the value of css property: property of Skin Variable: variable.
|
| e.g. with skin variable definitions:
MyVar = font-weight: bold; background-color: red; color:white; cssValue@(MyVar, background-color)@ == red |
|
or or @cssProperties(variable, prop1, prop2, ...)@ |
Returns the entire definition of the CSS properties: prop1, prop2, etc of
Skin Variable: variable. You can specify as many properties as you like.
|
| e.g. with skin variable definitions:
MyVar = font-weight: bold; background-color: red; color:white; cssValue@(MyVar, font-weight, color)@ == font-weight: bold; color: white; |
|
or @cssTextProps(variable)@ or @cssTextProperties(variable)@ |
Returns the full text of all CSS text-related properties of Skin Variable: variable.
This is the same as @cssProperties(variable, ...)@ with all of the following properties:
|
| e.g. with skin variable definitions:
MyVar = font-weight: bold; background-color: red; color:white; cssText@(MyVar, font-weight, color)@ == font-weight: bold; color: white; |
Note that the skin replacement function names are NOT case sensitive, so the following are all equivalent:
This is useful because small differences in the way that browsers display web pages can mean that the same CSS will show different results in different browsers. This is a fallback which allows the skin designer to specify different behavior for each browser, rather than ripping their hair out.
The meaning of the directives is as follows:
#IFDEF MSIE ToolbarMargin = margin:5px; #ELSE ToolbarMargin = margin:10px; #ENDIFIn this example, MSIE browsers will use a margin of 5 pixels, while all other browsers will use 10px.
Note that the example above could also have been written like so:
ToolbarMargin = margin:10px; #IFDEF MSIE ToolbarMargin = margin:5px; #ENDIFThe first form presented (using the #ELSE branch) is preferred as it is clearer to see what is going on.
If you need to do more than a simple #ELSE, nest two declarations:
#IFDEF MSIE ToolbarMargin = margin:10px; #ELSE #IFDEF GECKO ToolbarMargin = margin:5px; #ELSE ToolbarMargin = margin:0px; #ENDIF #ENDIFIn this example, MSIE will use 10px, GECKO will use 5px and other browsers (which, in practice generally means Safari) will use 0px.
If you need to have custom css for your skin, create a skin.css file in your skin directory, and update your manifest like so:... ...... ../_base/base2/skin.css
Note that you should almost always include the base skin.css file within your skin.... ...... ../_base/base2/skin.css skin.css
You do not need to do anything to include these files in your skin -- the appropriate ones are always used.
A brief explanation of each:
| Filename | Used for |
|---|---|
| common.css | Files common to many situations |
| dwt.css | Widget styling (Buttons, Toolbars, etc) |
| editor.css | HTML editor widget |
| login.css | Login (and splash screen) styles |
| msgview.css | Email message body styles |
| spellcheck.css | Spell checker styles |
| wiki.css | Zimbra Documents (wiki) page styles when opened in a new window |
| zhtml.css | Styles for the Standard (HTML) version |
| zlogin.css | Login (and splash screen) styles |
| zm.css | Styles specific to the Zimbra Web Client application |
| zmadmin.css | Styles specific to the Zimbra Administration application |
| zmobile.css | Styles for the mobile-phone version of ZWC |
| Filename | Use |
|---|---|
| skin.html | Provides structure to the application layout, directing the app where to put components like the Overview Tree and Mini-Calendar, as well as providing visual styling for these Skin Zones. |
| splash.html | Provides HTML for the Splash Screen, which is displayed to the user as the application is loading. |
If you wanted, for example, to use the standard skin.html file but want a custom splash screen, create the file splash.html in your skin directory, and edit your manifest.xml to look like so:... ... ...../_base/base2/skin.html ../_base/base2/splash.html ...
... ... ...../_base/base2/skin.html splash.html ...
Regardless of how you start, it is important to pay attention to a few rules:
If you wish to visually omit a zone, create an element with the appropriate ID and position it with CSS so that it is off screen -- this will hide it from the user.
There is just one rule to follow for your splash screen:
If you are using the standard skin.html file, you should just include the standard skin.js file (skins/_base/base2/ZmSkin.js) from the base skin directory -- everything is set up properly. To use the standard skin.js file, your manifest.xml should look like the following:
... ... ... ...
If you have a custom skin.html file, you might need to have a custom skin.js file. If you keep all of the same IDs for the Skin Zones as detailed below, you may be able to skip this step.
If you do need to create a custom skin.js file, it is easiest to base your skin.js file on the standard one: to do this, create a new file .../zimbra/skins/YourSkin/skin.js and update your manifest.xml like so:
... ... <script> ...../_base/base2/ZmSkin.js skin.js </script> ...
Note that the base skin.js file must come before your skin.js file.
Detailing the Javascript code that you must include in your custom skin is beyond the scope of this document -- please Getting Help for more information on making javascript changes to your skin.
Note that slightly lighter and darker shades of each of these colors are generated automatically (using the @darken(...)@ and @lighten(...)@ Skin Functions) to create a cohesive look in the skin.
| Skin Variable | Purpose |
|---|---|
| AppC | Master color for the entire skin. Shades of this color are used as background and border colors for most of the Skin Zones. |
| AltC | Alternate color for the skin. Shades of this color are generally used for: Toolbars, Selected/highlighted buttons, etc. |
| SelC | highlight color for lists. |
Following is a list of other colors which are used to change various parts of the skin -- you generally will not need to change these colors:
| Skin Variable | Purpose |
|---|---|
| HilightColor | Background color for right-clicked items, drag and drop, selected item in a tree |
| HilightColor-blurred | Background color for tree items when the tree does not have focus |
| MatchedColor | Background color for items matched in a search (default is HilightColor) |
| RightClickColor | Background color for right-click items (default is HilightColor) |
| HeaderColor | Background color for headers, such as in the tree, above a list, etc |
| InputBgColor | Background color for INPUT elements (text fields) |
| WidgetBgColor | Background color for widgets such as Buttons and Selects |
| SeparatorColor | Border color for separators between sections |
Here's a diagram of the zones of the "beach" skin. Note that some zones may typically be hidden -- for example, the ad zones, or the Advanced Search ("search_builder") zones are often hidden.

Each zone corresponds to an element (generally a DIV) in the skin.html file -- we call these "Skin Containers". Use the table below to map the names of the skin container elements to the Skin Variables that control them:
| Element IDs | Skin Variables used | Purpose | |
|---|---|---|---|
| Normal skin zones | |||
| skin_outer | SkinOuter | Outer container of the skin itself | |
| skin_container_logo | SkinBorderLogo | Logo | |
| skin_container_search | SkinBorderSearch | Container for the search toolbar | |
| skin_container_web_search | SkinBorderWebSearch | Container for the web search toolbar | |
| skin_container_username | SkinTextUsername | Name of the current user | |
| skin_container_quota | SkinBorderQuota | Disk quota usage area | |
| skin_container_switch | (none) | Switch between Ajax and HTML clients link | |
| skin_container_help | (none) | Help button | |
| skin_container_logoff | (none) | Logout button | |
| skin_container_offline_status | (none) | Online/offline status indicator | |
| skin_container_search_builder | SkinBorderSB | "Advanced" search area | |
| skin_container_search_builder_toolbar | SkinBorderSBToolbar | Toolbar for Search Builder (now called "Advanced Search") | |
| skin_container_app_chooser | SkinBorderAppChooser | Application tabs (to switch between apps) | |
| skin_container_current_app | SkinBorderCurrentApp | Toolbar for the Overview Tree | |
| skin_container_app_top_toolbar | SkinBorderAppToolbar | Toolbar for the App Area | |
| skin_container_tree | SkinBorderTree | Tree of folders | |
| skin_container_tree_footer | SkinBorderMiniCal | Mini-calendar in the lower left side | |
| skin_container_tree_app_sash | SkinBorderTreeSash | Vertical bar that resizes the tree and application zones | |
| skin_container_app_main | SkinBorderApp | Main application area (switches based on current app) | |
| Ad containers -- see Working with Ads | |||
| skin_container_top_ad | AdStyle, TopAdHeight | Space for a top "banner" ad | |
| skin_container_sidebar_ad | AdStyle, SidebarAdWidth | Space for a "skyscraper" ad to the right of the app | |
| skin_container_tree_top_ad | AdStyle, TreeTopAdHeight | Space for a small ad above the tree | |
| skin_container_tree_bottom_ad | AdStyle, TreeBottomAdHeight | Space for a small ad below the tree | |
| skin_container_bottom_ad | AdStyle, BottomAdHeight | Space for an ad on the bottom of the window | |
| Splash screen and login panel | |||
| skin_container_splash_screen | SkinOuter | Background outside of the splash screen and login panel | |
| ZSplashPanel | SplashOuterBorder | Splash screen outer container | |
| ZSplashBodyContainer | SplashOuterBorder | Splash screen inner container | |
| ZLoginPanel | LoginPanelOuterBorder | Login panel outer container | |
| ZLoginBodyContainer | LoginPanelInnerBorder | Login panel inner container | |
| Deprecated | |||
| skin_container_status | status area (no longer shown) | ||
To customize a particular skin container listed above, create an entry for it's skin Variable in your skin.properties file and specify the CSS properties that you want for that zone. It is a good idea to start off with the definition of that skin variable in the .../zimbra/skins/_base/base2/skin.properties file.
Most of the skin containers are defined in terms of the Logical Skin Zone Variables defined below -- you may find it advantageous to change these logical variables (which will affect many different zones) rather than change each zone individually.
Also, note that if the base skin.properties file specifies a width and/or height for a particular skin zone, you should specify that as well or the skin may not lay out properly.
For the skin variables named SkinBorder*, you can generally customize the following CSS properties:
... SkinBorderSearch = height:31px; background-color:pink; padding:5px; \ border:1px solid red; @roundCorners(5)@ SkinBorderAppToolbar = @ToolbarContainer@ background-color:pink; ...
Note that the SkinBorderAppToolbar variable above is defined in terms of the ToolbarContainer replacement (see below) -- this is a common pattern. Placing the background-color entry after the ToolbarContainer replacement ensures that it will override any background-color set in ToolbarContainer.
| Skin Variable | Purpose | Used in Skin Variables | CSS Properties |
|---|---|---|---|
| ChromeBg | The outer background for the entire application. Based on AppC. | SkinOuter | background-image |
| PanelColor | "Panels" are zones like the Tree, App, Mini-Calendar, etc. Based on AppC. | (see PanelContainer) | CSS color |
| PanelBg | Background for "panels". Based on AppC. | (see PanelContainer) | background-color or background-image |
| PanelBorder | Border for "panels". Based on AppC. | (see PanelContainer) | border |
| PanelContainer | Background and border for "panels". Based on AppC. | TreeContainer, SplashOuterBorder, SkinBorderSearch, SkinBorderSB, SkinBorderTree, SkinBorderMiniCal, SkinBorderApp | background, border |
| ToolbarBg | Background for toolbars. Based on AltC. | (see ToolbarContainer) | background-color or background-image |
| ToolbarContainer | Background and borders for main toolbars. Based on AltC. | InlineToolbarContainer, SkinBorderSBToolbar, SkinBorderCurrentApp, SkinBorderAppToolbar, MiniCalHeaderBg, | height (required), padding, background, border |
| TreeHeaderContainer | Background and border for tree headers. Based on HeaderColor. | background, border | |
| PageBg | Background for application "pages", such as tabs atop the Preferences screens, behind the Advanced Search section, etc. Based on AppC. | WizardBg, SkinBorderPage, | background-image or background-color |
| PageHeaderBg | Background and/or border for header section of application pages, eg message header. Based on HeaderColor. | background, border | |
| PageHeaderText | Text styling for page headers | text and font properties | |
| ListBg | Background color in list views. Based on AppC. | background-color or background-image | |
| ListBorder | Border for list views. Based on AppC. | border | |
| WizardBg | Background for wizards (mainly used in ZimbraOffline). Based on AppC. | background-color or background-image |
You can customize the color and border of most widgets in ZWC easily using the following Skin Variables.
In addition to the normal appearance of each widget, you can control the appearance of the widget in the following states:
| State | Meaning |
|---|---|
| normal | Widget in its 'normal' state (e.g. not interacting with the mouse or keyboard) |
| disabled | Widget when it is not available to be used |
| hover | Widget when the mouse is over the control |
| active | Widget when it is being pressed |
| focused | Widget when it has the keyboard focus |
| selected | Widget when it has been 'selected', for example a selected tab or a row in a list that is selected |
| sel-focus | Widget that is both selected and focused (in list viewers only) |
| default | Widget that will be activated when the return key is pressed |
| actioned | Widget that is being right-clicked |
| dragProxy | Widget that is currently being dragged |
| Skin Variable | Purpose |
|---|---|
| WidgetBgColor | Background color for most widgets |
| WidgetBorder | Styles applied to most widgets in all states |
| WidgetBorder-normal | Styles applied to widgets in their 'normal' state |
| WidgetBorder-disabled | Styles applied to widgets in their 'disabled' state |
| WidgetBorder-hover | Styles applied to widgets in their 'hover' state |
| WidgetBorder-selected | Styles applied to widgets in their 'selected' state |
| WidgetBorder-active | Styles applied to widgets in their 'active' state |
| WidgetBorder-default | Styles applied to widgets in their 'default' state |
| WidgetBorder-focused | Styles applied to widgets in their 'focused' state |
| WidgetHeaderContainer | Styles applied to most widget headers (e.g. headers of a list or tree) |
| WidgetHeaderContainer-normal | Styles applied to widget headers in their 'normal' state |
| WidgetHeaderContainer-hover | Styles applied to widget headers in their 'hover' state |
| WidgetHeaderContainer-selected | Styles applied to widget headers in their 'selected' state |
| Skin Variable | Purpose |
|---|---|
| WidgetHeight | Height of widgets such as Select, Button, etc. Default is 20px |
| ButtonHeight | Height of Buttons, ToolbarButtons. Default is 24px. |
| TextButtonWidth | Minimum-width of buttons that have text in them, for example, OK and Cancel buttons in a dialog. Default is 60px. |
| ListItemHeight | Height of items in List views. Default is 18px. |
| TreeItemHeight | Height and padding of tree items. Default is 18px. |
| AccordionItemHeight | Height of Accordion items. Default is 24px |
| SashSize | Width or height of application sashes, e.g. between the list of messages and message view. Default is 8px. |
| TextPaddingSize | Padding around text. Default is 3px. |
| PanelPaddingSize | Padding around 'panels', such as the Tree, etc. Default is 10px. |
| BoxPaddingSize | Padding around 'boxes', or different sections of a skin zone. Default is 5px. |
| BoxMarginSize | Margin around 'boxes'. Default is 5px. |
| SmallBoxPaddingSize | Padding around 'boxes' that are spaced closely together. Default is 2px. |
| SmallBoxMarginSize | Margin around small 'boxes'. Default is 2px. |
| SmallIconWidth | Width of normal icons, e.g. in toolbars. |
| SmallIconHeight | Height of normal icons. |
| BigIconWidth | Width of large icons, not frequently used. |
| BigIconHeight | Height of large icons. |
| Skin Variable | Usage |
|---|---|
| Button | Outer styles for Button widgets |
| ButtonBorder | Border class applied to Buttons in all states. |
| ButtonBorder-normal | Border class applied to Buttons in "normal" state. |
| ButtonBorder-disabled | ... in "disabled" state. |
| ButtonBorder-hover | ... in "hover" state. |
| ButtonBorder-active | ... in "active" state. |
| ButtonBorder-focused | ... in "focused" state. |
| ButtonBorder-selected | ... in "selected" state. |
| ButtonBorder-default | ... in "default" state. |
| ButtonText | Text style applied to Buttons in all states. |
| ButtonText-normal | ... in "normal" state. |
| ButtonText-disabled | etc. |
| ButtonText-hover | |
| ButtonText-active | |
| ButtonText-focused | |
| ButtonText-selected | |
| ButtonText-default | |
| Skin Variable | Usage |
|---|---|
| ToolbarButton | Outer styles for buttons in toolbars. |
| ToolbarButtonBorder | Border applied to Toolbar Buttons in all states. |
| ToolbarButtonBorder-normal | ... in "normal" state. |
| ToolbarButtonBorder-disabled | etc. |
| ToolbarButtonBorder-hover | |
| ToolbarButtonBorder-active | |
| ToolbarButtonBorder-default | |
| ToolbarButtonBorder-focused | |
| ToolbarButtonBorder-selected | |
| ToolbarButtonText | Text styles applied to Toolbar Buttons in all states. |
| ToolbarButtonText-normal | ... in "normal" state. |
| ToolbarButtonText-disabled | etc. |
| ToolbarButtonText-hover | |
| ToolbarButtonText-active | |
| ToolbarButtonText-default | |
| ToolbarButtonText-focused | |
| Skin Variable | Usage |
|---|---|
| Select | Outer styles for all Selects. |
| SelectBorder | Border applied to Selects in all states. |
| SelectBorder-normal | ... in "normal" state. |
| SelectBorder-disabled | etc. |
| SelectBorder-hover | |
| SelectBorder-active | |
| SelectBorder-focused | |
| SelectText | Text styles applied to Selects in all states. |
| SelectText-normal | ... in "normal" state. |
| SelectText-disabled | etc. |
| SelectText-hover | |
| SelectText-active | |
| SelectText-focused | |
| Skin Variable | Usage |
|---|---|
| AppTab | Outer style for application tabs |
| AppTabColor | Color of application tabs when not selected (also used by SkinBorderAppChooser). |
| AppTabSpacing | Spacing between application tabs |
| AppTabRoundCorners | Round corners for top of app tabs when selected (Firefox and Safari only). |
| AppTabBorder | Border applied to app tabs in all states. |
| AppTabBorder-normal | ... in "normal" state. |
| AppTabBorder-disabled | etc. |
| AppTabBorder-hover | |
| AppTabBorder-active | |
| AppTabBorder-focused | |
| AppTabBorder-selected | |
| AppTabText | Text styles applied to app tabs in all states. |
| AppTabText-normal | ... in "normal" state. |
| AppTabText-disabled | etc. |
| AppTabText-hover | |
| AppTabText-active | |
| AppTabText-focused | |
| AppTabText-selected | |
| Skin Variable | Usage |
|---|---|
| TabBar | Background style for tab bar, behind the tabs. |
| TabBarPrefix | Styles for space before the first tab in tab bar. |
| TabBarSuffix | Styles for space after last tab in tab bar. |
| Tab | Styles applied to all tabs. |
| TabSpacing | Spacing between tabs. |
| TabBorder | Border applied to tabs in all states. |
| TabBorder-normal | ... in "normal" state. |
| TabBorder-disabled | etc. |
| TabBorder-hover | |
| TabBorder-active | |
| TabBorder-focused | |
| TabBorder-selected | |
| TabText | Text styles applied to tabs in all states. |
| TabText-normal | ... in "normal" state. |
| TabText-disabled | etc. |
| TabText-hover | |
| TabText-active | |
| TabText-focused | |
| TabText-selected | |
| Skin Variable | Usage |
|---|---|
| ListContainer | Outer container for a list view (such as the list of messages or contacts). |
| ListHeaderContainer | Outer container list headers |
| ListColHeaderContainer | Column header for lists in all states. |
| ListColHeaderContainer-normal | ... in "normal" state. |
| ListColHeaderContainer-hover | etc. |
| ListColHeaderContainer-selected | |
| ListColHeaderText | Text styles of list column header in all states. |
| ListColHeaderText-normal | ... in "normal" state. |
| ListColHeaderText-hover | etc. |
| ListColHeaderText-selected | |
| ListItemBgColor-normal | Background color for list items in "normal" state. |
| ListItemBgColor-alt | Background color for every other list item (alternating colors). |
| ListItemBgColor-hover | Background color for list item in "hover" state. |
| ListItemBgColor-active | ... in "active" state. |
| ListItemBgColor-matched | etc. |
| ListItemBgColor-selected | |
| ListItemBgColor-actioned | |
| ListItemContainer | Background and border for list items in all states. |
| ListItemContainer-normal | ... in "normal" state. |
| ListItemContainer-alt | etc. |
| ListItemContainer-disabled | |
| ListItemContainer-hover | |
| ListItemContainer-active | |
| ListItemContainer-matched | |
| ListItemContainer-selected | |
| ListItemContainer-focused | |
| ListItemContainer-sel-focus | |
| ListItemContainer-actioned | |
| ListItemContainer-dragProxy | |
| ListItemText | Text styles for list items in all states. |
| ListItemText-normal | in "normal" state. |
| ListItemText-alt | etc. |
| ListItemText-disabled | |
| ListItemText-hover | |
| ListItemText-active | |
| ListItemText-matched | |
| ListItemText-focused | |
| ListItemText-selected | |
| ListItemText-sel-focus | |
| ListItemText-actioned | |
| ListItemText-dragProxy | |
| Skin Variable | Usage |
|---|---|
| TreeItem | Background and border for tree item in all states. |
| TreeItemText | Text styles for tree item in all states. |
| TreeItemSpacing | Spacing between one tree item and the next. |
| Skin Variable | Usage |
|---|---|
| AccordionBorder | Outer border for an accordion widget. |
| AccordionItemBorder | Outer border for an accordion button in all states. |
| AccordionItemBorder-normal | ... in "normal" state. |
| AccordionItemBorder-selected | etc. |
| AccordionItemText | Text for accordion button in all states. |
| AccordionItemText-normal | ...in "normal" state. |
| AccordionItemText-selected | etc. |
| Skin Variable | Usage |
|---|---|
| MenuContainer | Outer border for the entire menu. |
| MenuItem | Outer styles for each menu item. |
| MenuItemBorder | Border for menu items in all states. |
| MenuItemBorder-normal | ... in "normal" state. |
| MenuItemBorder-disabled | etc. |
| MenuItemBorder-hover | |
| MenuItemBorder-active | |
| MenuItemText | Text styles for menu items in all states. |
| MenuItemText-normal | in "normal" state. |
| MenuItemText-disabled | ... |
| MenuItemText-hover | |
| MenuItemText-active | |
| MenuItemTextPadding | Padding around text/icons in menu item. |
| MenuItemSeparator | Separator within a menu. |
| Skin Variable | Usage |
|---|---|
| TooltipContainer | Outer border of the entire tooltip. |
| TooltipText | Text for the tooltip. |
| TooltipText-label | Text for "labels" within the tooltip. |
| TooltipArrowContainer | Styles for the arrow of the tooltip. |
| Skin Variable | Usage |
|---|---|
| Anchor | Style for text anchors in all states. |
| Anchor-hover | ... in "hover" state. |
| Anchor-active | etc. |
| Anchor-disabled | |
| Anchor-matched | |
| ZimletBg | Style for text matched as a Zimlet (e.g. a date in an email message) in all states. |
| ZimletBg-Hover | ... in "hover" state. |
| Skin Variable | Usage |
|---|---|
| ZFieldBg-normal | Background color for text fields in "normal" state. |
| ZFieldBg-error | ... in "error" state. |
| ZFieldBg-required | etc. |
| ZFieldBg-focused | |
| ZFieldBg-disabled | |
| InputBorder | Border for text fields in all states. |
| InputBorder-disabled | Border for text fields when disabled. |
| InputField | Styles for input fields in all states. |
| InputField-normal | ... in "normal" state. |
| InputField-focused | etc. |
| InputField-error | |
| InputField-required | |
| InputField-disabled | |
| InputField-hint | |
| TextArea | Styles for text areas in all states. |
| TextArea-normal | ... in "normal" state. |
| TextArea-focused | etc. |
| TextArea-error | |
| TextArea-required | |
| TextArea-disabled | |
| Skin Variable | Usage |
|---|---|
| MiniCalBg | Background of the entire mini-calendar. |
| MiniCalHeaderBg | Background of the mini-calendar header. |
| MiniCalHeaderText | Text for the mini-calendar header. |
| MiniCalDOWBg | Background for the "Day Of Week" section of the mini-calendar. |
| MiniCalDOWText | Text for the... |
| MiniCalButton | Styles applied to mini-calendar buttons in all states. |
| MiniCalButton-normal | .... in "normal" state. |
| MiniCalButton-hover | etc. |
| MiniCalButton-active | |
| MiniCalButton-today | |
| MiniCalDay-hilited | Mini-cal button when hilited (eg: appointments on that day). |
| MiniCalDay-today | Mini-cal button for today. |
| MiniCalDay-wrongMonth | Mini-cal button for "wrong" month (eg: before start or end of displayed month). |
| MiniCalDay-selected | Mini-cal button for days displayed in the calendar view. |
| Skin Variable | Usage |
|---|---|
| Slider | Styles applied to the outside of the slider. |
| SliderBorder | Border applied to horizontal and vertical slider. |
| SliderThumbBorder | Border applied to horizontal and vertical slider thumbs (the part you drag). |
| HSliderSize | Width and height of a horizontal slider. |
| HSliderBorder | Border applied to a horizontal slider. |
| HSliderThumbSize | Size of a horizontal slider thumb. |
| HSliderThumbBorder | Border of a horizontal slider thumb. |
| VSliderSize | (same as HSlider*) |
| VSliderBorder | |
| VSliderThumbSize | |
| VSliderThumbBorder | |
| Skin Variable | Usage |
|---|---|
| WindowBg | Background color of windows. |
| WindowContainer | Border and color of windows. |
| WindowContainer-focused | Border and color of window in "focused" state. |
| WindowOuterBorder | Outer border for application "windows" such as dialogs, based on AppC. Normally fairly dark, to be visible on top of the application. |
| WindowInnerBorder | Inner border for dialog windows. |
| LightWindowOuterBorder | Outer border for different colored window. Based on AltC |
| LightWindowInnerBorder | Inner border for different colored window. |
| WindowTitleText | Text styles for all window titles. |
| WindowTitleText-normal | Text styles for normal window titles. |
| WindowTitleText-light | Text styles for "light" window titles. |
| Skin Variable | Usage |
|---|---|
| FontFamily-default | Default font family for the entire app. |
| FontFamily-fixed | Default font family for fixed-width situations (like text-only email messages). |
| FontFamily-html | Default font family for HTML-edit situations. |
| FontSize-normal | Font size for most text in the app. Default is 11px. |
| FontSize-big | Font size for text that is slightly bigger. Default is 13px. |
| FontSize-bigger | Font size for text that is bigger still. Default is 15px & bold. |
| FontSize-biggest | Font size for text that is really bigger. Default is 18px & bold. |
| FontSize-smaller | Font size for text that is slightly smaller than normal. Default is 9px; |
| FontSize-miniscule | Font size for text that is incomprehensively small. Default is 6px. |
| FontSize-html | Font size for HTML editing. |
| Text | Normal text. |
| Label | Text labels (eg: before a text field). |
| Label-wrap | Text labels that should wrap. |
| Label-light | Text labels in a light context. |
| Text-light | Lighter text. |
| Text-required | Text for a required field. |
| Text-disabled | Disabled text. |
| Text-contrast | Text color in contrasting situations (like window titles) |
| Text-hover | Text when hovered over. |
| Text-active | Text when being clicked. |
| Text-selected | Text when selected. |
| Text-default | Text for default buttons. |
| Text-focused | Text for focused widgets. |
| Text-today | Text for today (in mini-calendar and calendar views). |
| Text-unread | Text for unread messages. |
| Text-deleted | Text for deleted messages. |
| Text-important | Text for important things. |
| Text-error | Text when in an error state. |
| Text-success | Text when something succeeded. |
| Text-matched | Text for things that matched a search. |
| Text-hint | Text for hints in text fields. |
| Text-anchor | Text for all links. |
| Text-anchor-hover | Text for links in "hover" state. |
| Text-anchor-active | Text for links in "active" state. |
| Text-anchor-disabled | Text for links in "disabled" state. |
| Skin Variable | Usage |
|---|---|
| TransparentBorder |
"Border" used for a widget, etc when you don't want a border to show up initially,
but will be showing a border on hover, etc.
For example, used in Toolbar Buttons so the buttons don't 'jump' when a border is shown on hover. |
| NormalOutsetBorder | Normal outset (raised) border based on the AppC variable. |
| MediumOutsetBorder | Slightly darker outset border based on AppC. |
| DarkOutsetBorder | Very dark outset border based on AppC. |
| NormalInsetBorder | Normal inset (lowered) border based on AppC. |
| MediumInsetBorder | Slightly darker inset border based on AppC. |
| DarkInsetBorder | Very dark inset border based on AppC. |
| AltOutsetBorder | Normal outset border based on AltC. |
| AltInsetBorder | Normal inset border based on AltC. |
| SelOutsetBorder | Normal outset border based on SelC. |
| SelInsetBorder | Normal inset border based on SelC. |
| DisabledBorder | Border for a disabled widget, based on AppC. |
| DefaultBorder | Border for a default widget -- the widget that will be activated by the return key. |
| FocusBorder | Border for a focused widget -- the widget that has keyboard focus. |
| DragBorder | Border for something being dragged in a drag-and-drop operation. |
| FieldBorder | Border for an input field. |
| SmallTransparentBorder | Transparent "border" for use in the Mini-Calendar. |
| SmallOutsetBorder | Outset border for use in the Mini-Calendar (based on AppC). |
| SmallInsetBorder | Inset border for use in the Mini-Calendar (based on AppC). |
In general, images in ZWC are specified with CSS as background-images,
and for efficiency, many images are merged together into "sprites", such as the image to the right.
The merging of images and the generation of the appropriate CSS classes is accomplished
automatically by the ZWC server.
Images are specified within the ZWC app with a CSS class name that is the same as the name of the image (minus the .gif or .png extension). So an image named: ImgRightArrow.gif will correspond to the CSS class name ImgRightArrow. The consequence of this mapping of image name to CSS class means that there can only be one image of any given name used within the system. The advantage of this is that it is easy to override any image that is used within the application -- you simply add another image of the same name to your skin.
All images in your skin should go in a directory named img/ inside your skin directory: .../zimbra/skins/YourSkin/img/. We'll refer to this below as your skin image directory. The skin variable SkinImgDir will automatically reference this directory.
To add an image to your skin:
... ChromeBg = @image(SkinImgDir, ChromeBg.gif, 100%, 100%, repeat)@ ...
Note that there are legal rules for who may customize these logos, as detailed below and at this site: http://www.zimbra.com/partners/trademark_branding_faq.html
LogoImgDir = /zimbra/skins/_base/logos LogoURL = http://www.zimbra.com
LogoImgDir = /zimbra/skins/_base/logos/ZimbraInside LogoURL = http://www.zimbra.com
LogoImgDir = /zimbra/skins/@SkinName@/logos LogoURL = http://www.yourcompany.comCreate your custom logos as specified below:
| Image Location | Notes |
|---|---|
| /skins/YourSkin/logos/LoginBanner.png | Shows up on the login and splash screens. Save it in the PNG format (alpha transparency is OK) at 450 pixels wide by 100 pixels tall. |
| /skins/YourSkin/logos/AppBanner.png | Shows up in the top-left of the application as it is running. Save it in the PNG format (alpha transparency is OK) at 120 pixels wide by 35 pixels tall. |
Note that you want to override one of the individual images, which should start with Img -- these images are generally in subdirectories of the image directory, eg: .../zimbra/img/arrows/ImgNextPage.gif. The large images such as arrows.gif are merged images which are generated automatically -- see Merging Images below for more information on this process.
Note that it is a good idea for you to create your images at the same size -- generally, 16 x 16 pixels -- as the original Zimbra image. If you do not, things may not line up properly. You do not need to put your images in the same directories as the original Zimbra images.
Most images are set to not repeat -- that is, the image should only show up once, even if the HTML element that displays it is larger than the image size. If you want an image to tile, or repeat, you indicate this by saving the image with a special name:
Note that the default behavior is that all images in each sub-folder of your skin image directory will be merged together. So if you have two folders in your image directory, you will end up with two merged images. This is for efficiency -- combining images is generally a good idea, but the bigger the combined image the more memory it will take up in the browser when it is used over and over. A couple of notes on image directories:
The easiest way to work with a large set of images is to have them in a single Photoshop file, and use the "Slice" command in Photoshop to cut the big image into individual images. It is a bit tricky to get Photoshop to save all of these files with exactly the same palette, but below is a formula that is known to work.
Step 1: save your color palette.
Step 2: save your images
You can verify that the images are saved with the same palette by opening two or more of the sliced images and choosing
The exception is the logo images (see Changing Logos), which should be saved as transparent PNGs to make sure that they look good on a variety of skin backgrounds.
Note that to change the default height or width of an ad, you should override the following skin variables:
| Ad | Skin Variable | Default Value |
|---|---|---|
| Top Ad | TopAdHeight | 60px |
| Sidebar Ad | SidebarAdWidth | 165px |
| Tree Top Ad | TreeTopAdHeight | 30px |
| Tree Bottom Ad | TreeBottomAdHeight | 60px |
| Bottom Ad | BottomAdHeight | 40px |
To do so, add an entry with the new size to your skin.properties file:
... TopAdHeight = 60px SidebarAdWidth = 165px TreeTopAdHeight = 30px TreeBottomAdHeight = 60px BottomAdHeight = 40px ...
You can override any templates in your skin to customize the appearance of the application. To do so:
... ... ...... templates/YourTemplateFile.template
The programming of templates is beyond the scope of this document -- see Getting Help for resources to help customize the appearance of the application via templates.
Note that there are five types of files in that directory, along with translations into French, Japanese, Spanish, etc:
To show custom messages in your skin:
Changing the layout of the Standard client, including placement of ads, is beyond the scope of this document -- see Getting Help for resources to make these changes.
To change the appearance of the login page, make changes directly to the "beach" skin, in the folder .../zimbra/skins/beach/. Simply make any logo or color changes you like to the .../zimbra/skins/beach/skin.properties file and it will show those changes on the login screen for all users. Also, as "beach" is the default skin for new users, this will also customize the skin that most of your users will see after login as well.
Unfortunately, changes you make to the "beach" skin will not necessarily survive upgrades to your ZWC install, as the new version will often change the default skins. To make sure your login skin survives upgrades, copy the "beach" skin into another directory before installing the upgrade, then replace the upgraded "beach" with the copy you just made.
We encourage you to upload any generally interesting skins that you create to the Gallery!
Each individual skin is contained in a directory underneath the skins/ directory in your WebApps directory -- for example, for the "beach" skin, all the files for the skin will be found at /opt/zimbra/jetty/webapps/zimbra/skins/beach/. This directory is known as your skins directory.
Note that most skins reference another, special skin directory to provide resources that are shared across many skins -- this is the base skin directory, and will generally be found at /opt/zimbra/jetty/webapps/zimbra/skins/_base/base2/.
If you have done a non-standard install of ZWC, please consult your install logs or the administrator of your computer to help find your skins directory.
cd /opt/zimbra/jetty/webapps/zimbra/skins/ zmskindeploy pumpkin/Note the slash after the name of the skin.
You can use the zmskindeploy command as many times as you like, for example, if you are actively making changes to a skin and you want to test, make a change, then re-test the skin.
You can also use zmskindeploy with a .zip file that contains a top-level folder with the same name as the skin. For example, to deploy "pumpkin" from a .zip file, create the zip file called pumpkin.zip with the structure:
pumpkin/manifest.xml pumpkin/skin.propertiesthen use zmskindeploy to deploy it
cp /downloads/pumpkin.zip /opt/zimbra/jetty/webapps/zimbra/skins/ cd /opt/zimbra/jetty/webapps/zimbra/skins/ zmskindeploy pumpkin.zip
After installing firebug, you will see a little green checkbox (or a red X) at the bottom-right corner of your browser window status bar. (You may need to restart Firefox or show the status bar to see this). Clicking this icon brings up the Firebug console, which gives you a number of powerful debugging tools for web pages in general.

Specifically for ZWC, you can use the "Inspect" button of Firebug (next to the little bug icon in the upper-left of the console) to figure out the CSS class of a particular part of the app you want to tweak.