Adding a style sheet to an Open Client application

  

Open Client Administration  

The style properties in your style sheet can be used to change the way the Open Client displays the dynamic and static controls. Typically, the background and foreground colours can be changed in both normal mode and disabled mode. The font can be changed for style, size and decoration. Borders can be altered for colour, width and style. Padding and margins can be set. The type of cursor can be altered. All this can be done for each type of control.

Adding a style sheet to an Open Client application

To add a style sheet to an Open Client application first add an appThemes folder to your application resource folders (e.g. .../myApplication/appThemes), where myApplication is the name of your application that you want to deploy using Open Client.

Next add your style sheet to the appThemes resource folder. You can add any number of style sheets to the appThemes folder and they will all be loaded by the Open Client after the PROIVDefaultStyle.css, therefore any style properties in them will override the default ones.

Including your own fonts in your style sheet

To include your own fonts in your style sheet you need to include the font files in your application resources. The font files go in the appFonts folder which you will need to add to your application resource folders in the PROIV installation, at the same level as the appThemes folder (e.g. .../ClientServices/wars/resources/openclient/myApplication/appFonts).

In your style sheet you need to define the font family. See the example below:

@font-face {
   font-family: Montserrat;
   src: url('montserrat-regular.ttf');
}

You don't need to specify the appFonts folder in the font-face url as the Open Client will assume that is where the font files are held.

Comment on this topic

Topic ID: 800110