Style Customization

Introduction

Portal Components use CSS custom properties (variables) for styling, allowing you to customize colors, fonts, spacing, and other visual aspects without modifying component code. Override these CSS variables in your own stylesheet to match your corporate design or application theme.

Note

A stylesheet added this way only affects the page it is loaded on. Portal also renders some of these components on its own pages, for example the Process Chain in the task header, which sits outside the iframe that shows your task form. Styles from your project cannot reach those instances. To restyle them, override the same CSS variables in custom.css instead, see Portal Styles Customization (Logos, Colors, Date Patterns).

How to customize

  1. You have to add a new css file to your resources and import it into your template.

    Code Example:

    <ui:composition template="/layouts/basic-10.xhtml">
       <ui:define name="title">test</ui:define>
       <ui:define name="content">
          <ic:com.axonivy.portal.components.ProcessChain steps="#{['Step 1','Step 2','Step 3']}" actualStepIndex="1" />
          <h:outputStylesheet name="layouts/styles/process-chain-customize.css" />
       </ui:define>
    </ui:composition>
    

    Note

    You have to place your css file in a <h:outputStylesheet /> below the component to override defined styles.

  2. Within this file you can override default css variables of components. For example, the --process-chain-menu-color:

    :root {
       --process-chain-menu-color: lightblue;
    }
    

List of css variables that you can override

Process Chain

Variable

Default value

Description

--process-chain-process-step-font-size

12px

Font size of the process step label.

--process-chain-circle-step-number-font-size

1rem

Font size of the step number inside a circle horizontal step.

--process-chain-menu-color

var(--primary-color, hsl(195, 100%, 29%))

Main color of the process steps: fill of a circle step and of a line step. Follows the branding primary color.

--process-chain-link-color

#D9DADA

Base color of the connectors between steps and of a waiting line step. Feeds the connector variables below.

--process-chain-body-background-color

rgba(0,0,0,0)

Background color of the gaps in the striped bar that replaces hidden line steps.

--process-chain-circle-step-border-color

var(--primary-color, hsl(195, 100%, 29%))

Border color of a circle step container in both directions.

--process-chain-circle-step-number-color

var(--primary-text-color, hsl(0, 0%, 100%))

Color of the step number of the current and visited circle steps.

--process-chain-circle-horizontal-waiting-step-background-color

rgba(0,0,0,0)

Background color of a waiting circle horizontal step.

--process-chain-circle-vertical-waiting-step-background-color

rgba(0,0,0,0)

Background color of a waiting circle vertical step.

--process-chain-circle-horizontal-connector-color

var(--process-chain-link-color, #D9DADA)

Color of the connector line between circle horizontal steps.

--process-chain-circle-horizontal-connector-visited-color

var(--primary-color, hsl(195, 100%, 29%))

Color of the connector line of a visited circle horizontal step.

--process-chain-circle-vertical-connector-color

var(--process-chain-link-color, #D9DADA)

Color of the connector line between circle vertical steps.

--process-chain-line-waiting-step-background-color

var(--process-chain-link-color, #D9DADA)

Background color of a waiting line step.

--process-chain-line-hidden-steps-background-color

hsl(0, 0%, 88%)

Color of the striped bar that replaces the hidden line steps on the right.

--process-chain-current-circle-horizontal-step-title-font-weight

bold

Font weight of the current circle horizontal process step title.

--process-chain-current-circle-vertical-step-title-font-weight

bold

Font weight of the current circle vertical process step title.

--process-chain-current-line-horizontal-step-title-font-weight

bold

Font weight of the current line horizontal process step title.

--process-chain-current-line-vertical-step-title-font-weight

bold

Font weight of the current line vertical process step title.

--process-chain-stage-current-icon-color

var(--primary-color, hsl(195, 100%, 29%))

Color of the current stage icon on the case map stage breadcrumb.

--process-chain-stage-visited-icon-color

hsl(0, 0%, 29%)

Color of a visited stage icon on the case map stage breadcrumb.

--process-chain-stage-waiting-icon-color

hsl(0, 0%, 88%)

Color of a waiting stage icon on the case map stage breadcrumb.

--process-chain-stage-flow-line-background-color

hsl(0, 0%, 88%)

Color of the flow line between stages on the case map stage breadcrumb.

Process Viewer

Variable

Default value

Description

--process-viewer-data-has-error-message-font-weight

normal

Error message font weight.

--process-viewer-data-has-error-message-font-size

1rem

Error message font size.

--process-details-column-title-font-size

0.85rem

Process details column title font size.