Skip to main content
Custom CSS

Custom CSS allows you to define and modify the styles of your portal.

Updated over 2 months ago

Custom CSS enables you to implement unique branding, enhance user interface designs, and tailor specific components to align with your company’s visual identity.

This guide covers the best practices, syntax, and essential features for writing and applying Custom CSS to your portal.

You can alter the CSS of your portal by navigating to Settings > Portal Settings > Custom CSS.

ℹ️ This feature is available on our Enterprise plan.

Example

.portal-button.portal-button-rounded {
color:brown;
border-radius: 20%;
background-color: aqua;
}

.portal-button {
color: gold;
}


1. Basic CSS Syntax

CSS is structured around selectors and declarations. A declaration contains properties and their corresponding values enclosed in curly braces {}.

cssCopy codeselector { property: value; }

Example:

cssCopy codeh1 { color: blue; font-size: 24px; }

2. Common CSS Selectors

  • Type Selector: Styles all elements of a given type.

cssCopy codep { color: red; }
  • Class Selector: Styles elements with a specific class.

cssCopy code.my-class { margin: 20px; }
  • ID Selector: Styles a unique element based on its ID.

cssCopy code#my-id { padding: 10px; }
  • Universal Selector: Applies styles to all elements.

cssCopy code* { box-sizing: border-box; }

3. Class Naming Conventions

Custom CSS in the portal follows a clear naming convention where all class names begin with .portal-, which helps avoid conflicts with global styles.

Examples include:

  • .portal-button

  • .portal-card

  • .portal-body


4. CSS Variables

Use these CSS variables to maintain a consistent theme across your portal:

Variable Name

Description

--portal-background-color

Main background color.

--portal-background-color-secondary

Secondary background color for other sections.

--portal-error-color

Color for error messages.

--portal-success-color

Color for success messages.


5. Status Colors

These colors apply to messages or statuses, making your UI more intuitive:

Variable Name

Purpose

--portal-info-color

For information messages.

--portal-warning-color

For warning messages.

--portal-success-color

For success notifications.

👇 Please see below for an example css file to get you started.

Attachment icon
Did this answer your question?