Sign In

CSS Themes

Applying A Theme

You can apply one of the standard built-in AppSynergy CSS themes to your application or create an entirely custom CSS theme. In either case there are steps you must take to apply the theme to your application to make it look its best.

To apply a new theme to your application begin by selecting the desired theme via File > App Settings... > CSS Theme. Once you have done this you may also need to modify some settings in your application to allow the theme to take effect:

Custom Themes

The easiest way to create a custom theme is to copy and paste a standard AppSynergy theme and modify it as desired.

Any widget attribute set to Theme Default in your application will now adopt the characteristics of the theme currently in effect for the application. CSS Themes are account-wide in scope, so the same CSS theme can be applied to multiple applications.

Inheritance and Custom CSS Classes

CSS classes follow the same inheritance hierarchy as the underlying widget class hierarchy (see the API documentation for details). For example, the inheritance hierarchy for a NumberFieldWidget is [AbstractWidget > FieldWidget > TextFieldWidget > NumberFieldWidget] whereas the inheritance hierarchy for a TextWidget (i.e. a piece of text, not a field) is simply [AbstractWidget > TextWidget]. This allows you to customize at a parent level and reformat all children, or create special variations for children.

ParaSQL uses multiple CSS selectors separated with spaces. For example, if you inspect a text widget you would see its CSS class defined as "AbstractWidget TextWidget". If you specify a custom CSS class for a widget it will be added (with a space) to the list of classes. The order of the classes specified on the widget do not matter, but the order of the CSS classes in your custom theme do.

We suggest that if you create a custom CSS class you do so as follows (note this example is for a TextWidget):

div.TextWidget.MyCustomClass { color: white; background-color: navy; border-color: transparent; border-radius: 5px; font-size: 10px; }

Then if you used Format > CSS Style... and specified MyCustomClass for a group of text objects their underlying CSS class definition would look something like this: "AbstractWidget MyCustomClass TextWidget" (with CSS specificity rules determining which settings prevail).

Note that in most cases you can achieve the customization you want just by customizing the built-in classes (as in the following examples) and setting the widget settings to Theme Default. Custom CSS Classes should be reserved for only those use cases where you need multiple variants within the same application (e.g. a TextWidget used for a field label vs. a TextWidget used for a heading above a record, or square vs. round buttons if your application uses both).

TIP: When running your app with Chrome, you can right-click on an element and choose Inspect. This will show you that element's class definition and its class hierarchy so that you can more easily understand how to customize it.

Default CSS Definitions

The following link contains all of the AppSynergy / ParaSQL CSS definitions. PLEASE DO NOT simply copy and paste all of the CSS into your theme and then modify just a few pieces as this is highly unmaintainable and will likely cause conflicts with future AppSynergy releases.