Theming
The Responsive UI theming styles all aspects of the component visuals, using CSS.
Your application’s views are built without knowledge of the current theme. The current theme styles all of the elements within your application’s views automatically, freeing you from having to worry about coming up with color schemes.
Your application-level CSS should never hardcode colors since those colors may conflict with the Responsive UI theming, and might not even be visible in some of the theme color sets.
Available themes
Responsive UI supports 10 enterprise themes…
Open theming with CSS variables
Responsive UI uses CSS variables to provide all themed values. These CSS variables are mostly specify color values, but they also include settings for font, border radius, box shadows, etc.
The name for each CSS variable starts with two hyphens, an “–rui-” prefix, and describes the value it contains. For example, the themed value for the primary button background color can be found in the --rui-btn-primary-bg
CSS variable and the value for button text font weight can be found in the --rui-btn-font-weight
CSS variable.
To reference, say, the themed primary button background color, use this notation in your CSS:
var(--rui-btn-primary-bg)
The binding of the values from the CSS variables happens at runtime. This allows you to reference all themed colors as standalone values that you can then assign to any property in any element, including your own components or any third-party components you want to use that are not officially supported in Responsive UI.
This returns the value for just this one themed color, not an assignment of that color to a specific property. This is important, because it allows you to grab just the color value in isolation, which you can then use in any way you like.
You’ll typically reference these CSS variables in your own CSS classes like what’s shown below, mapping the CSS variable value to any property that takes the same data type. This example takes a specific themed color value — one that’s typically used as a background color — and uses that as a border color.
.my-component {
border: 1px solid var(--rui-btn-primary-bg);
}
Whenever the theme changes, a new set of CSS variables for the selected theme is loaded into the DOM, automatically updating any CSS variable references like the one shown above. This allows you to reference our themed color values and apply them to elements in your application in a theme safe way.
Most of the themed values are color values. If you apply only a color value to text, you won’t get the correct font face, font size, font weight, etc. There are new CSS variables for these settings too, and there’s a good chance we’ll be adding more CSS variables over time too.
Using CSS variables for our theming also opens the ability for anyone to create new themes, including custom themes and FI-branded themes. We do not have a theme generator utility at this point, so custom theme creation would be a manual process, but it is possible.
CSS variable example in sample application
You can see an example of CSS variable usage in the Theming view and in the Data Density view in the sample application.
List of available CSS variables
This section lists the CSS variables that are available for you to reference in your applications.
VARIABLE | DESCRIPTION |
---|---|
--rui-accent | Accent color; typically used to indicate that a sub-element is clickable |
--rui-back-to-top-bg | Background color behind back-to-top arrow in function view |
--rui-back-to-top-border | Border color around back-to-top arrow in function view |
--rui-body-bg | Background color behind function view that does not include any display blocks |
--rui-body-bg-with-display-blocks | Background color behind function view that includes at least one display block |
--rui-box-shadow | Base color for all drop shadows |
--rui-box-shadow-dialog-box | Drop shadow for dialog boxes |
--rui-box-shadow-display-block | Drop shadow for display blocks |
--rui-box-shadow-floating-toolbar | Drop shadow for floating toolbar |
--rui-box-shadow-form-control | Drop shadow for form elements (inset) |
--rui-box-shadow-header | Drop shadow for the main header |
--rui-box-shadow-menu-header | Drop shadow for header menus |
--rui-box-shadow-menu-nav | Drop shadow for nav menus |
--rui-box-shadow-popup | Drop shadow for popups |
--rui-breadcrumb | Foreground color for breadcrumbs above the function title |
--rui-breadcrumb-display-block | Foreground color for breadcrumbs in the content |
--rui-breadcrumb-separator | Foreground color for breadcrumb separators above the function title |
--rui-breadcrumb-separator-display-block | Foreground color for breadcrumb separators in the content |
--rui-btn-badge-bg-destructive | Badge background color for destructive buttons |
--rui-btn-badge-bg-primary | Badge background color for primary buttons |
--rui-btn-badge-bg-secondary | Badge background color for secondary buttons |
--rui-btn-badge-border-radius | Border radius for badges |
--rui-btn-badge-border-style | Border stye for badges |
--rui-btn-badge-border-width | Border width for badges |
--rui-btn-badge-fg-destructive | Badge foreground color for destructive buttons |
--rui-btn-badge-fg-primary | Badge foreground color for primary buttons |
--rui-btn-badge-fg-secondary | Badge foreground color for secondary buttons |
--rui-btn-badge-font-size | Badge font size |
--rui-btn-badge-font-weight | Badge font weight |
--rui-btn-badge-line-height | Badge line height |
--rui-btn-badge-min-width | Badge minimum width |
--rui-btn-badge-padding | Badge padding |
--rui-btn-badge-right | Badge offset from right edge of button |
--rui-btn-badge-top | Badge offset from top edge of button |
--rui-btn-border-radius | Border radius for buttons |
--rui-btn-border-style | Border style for buttons |
--rui-btn-border-width | Border thickness for buttons |
--rui-btn-box-shadow | Drop shadow for buttons |
--rui-btn-destructive-bg | Destructive button background color |
--rui-btn-destructive-bg-active | Destructive button background color when pressed |
--rui-btn-destructive-bg-disabled | Destructive button background color when disabled |
--rui-btn-destructive-bg-hover | Destructive button background color when hovered |
--rui-btn-destructive-border | Destructive button border color |
--rui-btn-destructive-border-disabled | Destructive button border color when disabled |
--rui-btn-destructive-fg | Destructive button foreground color |
--rui-btn-destructive-fg-disabled | Destructive button foreground color when disabled |
--rui-btn-destructive-fg-hover | Destructive button foreground color when hovered |
--rui-btn-font-size-md | Font size for medium buttons |
--rui-btn-font-size-sm | Font size for small buttons |
--rui-btn-font-weight | Font weight for buttons |
--rui-btn-line-height-md | Line height for medium buttons |
--rui-btn-line-height-sm | Line height for small buttons |
--rui-btn-misc-bg | Background color for clickable tags and active toggle buttons and button group buttons |
--rui-btn-misc-bg-disabled | Background hover color for disabled clickable tags and active toggle buttons and button group buttons |
--rui-btn-misc-bg-hover | Background hover color for clickable tags and active toggle buttons and button group buttons |
--rui-btn-misc-fg | Foreground color for clickable tags and active toggle buttons and button group buttons |
--rui-btn-misc-fg-disabled | Foreground hover color for disabled clickable tags and active toggle buttons and button group buttons |
--rui-btn-misc-fg-hover | Foreground hover color for clickable tags and active toggle buttons and button group buttons |
--rui-btn-padding-md | Padding for medium buttons |
--rui-btn-padding-sm | Padding for small buttons |
--rui-btn-primary-bg | Primary button background color - rest state |
--rui-btn-primary-bg-active | Primary button background color - active state |
--rui-btn-primary-bg-disabled | Primary button background color - disabled state |
--rui-btn-primary-bg-hover | Primary button background color - hover state |
--rui-btn-primary-border | Primary button border color |
--rui-btn-primary-border-disabled | Primary button border color - disabled state |
--rui-btn-primary-fg | Primary button foreground color - rest state |
--rui-btn-primary-fg-disabled | Primary button foreground color - disabled state |
--rui-btn-primary-fg-hover | Primary button foreground color - hover state |
--rui-btn-secondary-bg | Secondary button background color - rest state |
--rui-btn-secondary-bg-active | Secondary button background color - active state |
--rui-btn-secondary-bg-disabled | Secondary button background color - disabled state |
--rui-btn-secondary-bg-hover | Secondary button background color - hover state |
--rui-btn-secondary-border | Secondary button border color |
--rui-btn-secondary-border-disabled | Secondary button border color - disabled state |
--rui-btn-secondary-fg | Secondary button foreground color - rest state |
--rui-btn-secondary-fg-disabled | Secondary button foreground color - disabled state |
--rui-btn-secondary-fg-hover | Secondary button foreground color - hover state |
--rui-btn-toggle-bg-off | Toggle button background color when off |
--rui-btn-toggle-bg-off-hover | Toggle button hover background color when off |
--rui-btn-toggle-bg-on | Toggle button background color when on |
--rui-btn-toggle-bg-on-hover | Toggle button hover background color when on |
--rui-btn-toggle-fg | Toggle button foreground color |
--rui-busy-indicator | Busy indicator spinner color |
--rui-busy-indicator-backdrop | Busy indicator backdrop color |
--rui-chart-data-series-color-1 | Chart data series color 1 |
--rui-chart-data-series-color-2 | Chart data series color 2 |
--rui-chart-data-series-color-3 | Chart data series color 3 |
--rui-chart-data-series-color-4 | Chart data series color 4 |
--rui-chart-data-series-color-5 | Chart data series color 5 |
--rui-chart-data-series-color-6 | Chart data series color 6 |
--rui-chart-data-series-color-7 | Chart data series color 7 |
--rui-chart-data-series-color-8 | Chart data series color 8 |
--rui-chart-data-series-color-9 | Chart data series color 9 |
--rui-chart-data-series-color-10 | Chart data series color 10 |
--rui-chart-data-series-translucent-color-1 | Chart data series color 1 - with translucence |
--rui-chart-data-series-translucent-color-2 | Chart data series color 2 - with translucence |
--rui-chart-data-series-translucent-color-3 | Chart data series color 3 - with translucence |
--rui-chart-data-series-translucent-color-4 | Chart data series color 4 - with translucence |
--rui-chart-data-series-translucent-color-5 | Chart data series color 5 - with translucence |
--rui-chart-data-series-translucent-color-6 | Chart data series color 6 - with translucence |
--rui-chart-data-series-translucent-color-7 | Chart data series color 7 - with translucence |
--rui-chart-data-series-translucent-color-8 | Chart data series color 8 - with translucence |
--rui-chart-data-series-translucent-color-9 | Chart data series color 9 - with translucence |
--rui-chart-data-series-translucent-color-10 | Chart data series color 10 - with translucence |
--rui-chart-grid-color | Chart grid line color |
--rui-content-primary-bg | Primary content background color, used as the backdrop for display blocks and group boxes |
--rui-content-secondary-bg | Secondary content background color, used as the background for dialog box button bar, non-clickable tags, pre blocks, etc |
--rui-display-block-bg | Display block background color |
--rui-display-block-border-color | Display block border color |
--rui-display-block-border-radius | Display block border radius |
--rui-display-block-border-width | Display block border width |
--rui-display-block-padding | Display block padding |
--rui-display-block-subtitle-opacity | Display block subtitle opacity |
--rui-display-block-title-size | Display block title size |
--rui-fixed-layout-gap-size | Fixed layout gap size |
--rui-font-family | Font family fallback list for content |
--rui-font-family-chrome | Font family fallback list for "chrome" elements and headers |
--rui-font-size | Typical font size |
--rui-font-weight | Typical font weight |
--rui-form-disabled-bg | Background color for disabled form elements |
--rui-form-disabled-fg | Foreground color for disabled form elements |
--rui-form-input-text-align | Text alignment of form input elements |
--rui-form-required-field | Color for the required field indicator (asterisk) |
--rui-function-title | Function title text color |
--rui-function-view-padding | Function view padding |
--rui-function-view-title-size | Function view title size |
--rui-grid-btn-fg-disabled | Disabled grid button foreground color |
--rui-group-box-bg | Group box background color |
--rui-group-box-subtitle-opacity | Group box subtitle opacity |
--rui-image-filter | Image filter: used to slightly dim images in dark mode for better contrast |
--rui-line | Lighter border color, used for group boxes, form elements, subheaders, and tab bars |
--rui-line-heavy | Heavier border color, used for checkboxes |
--rui-line-height | Typical line height |
--rui-list-item-hovered-bg | Background color for hovered list items |
--rui-list-item-hovered-fg | Foreground color for hovered list items |
--rui-list-item-selected-bg | Background color for selected list items |
--rui-list-item-selected-fg | Foreground color for selected list items |
--rui-main-header-bg | Background color of header |
--rui-main-header-bg-hover | Hover background color of header elements |
--rui-main-header-border-bottom | Bottom border color of header |
--rui-main-header-fg | Foreground color for header elements |
--rui-main-header-height | Header height |
--rui-main-nav-bg | Background color of nav bar |
--rui-main-nav-bg-active | Background color of active nav element |
--rui-main-nav-border | Border color of nav bar |
--rui-main-nav-fg-active | Foreground color for active nav element |
--rui-main-nav-fg-inactive | Foreground color for inactive nav elements |
--rui-main-nav-separator | Line color for nav bar separators |
--rui-main-nav-width-collapsed | Nav bar width: collapsed |
--rui-main-nav-width-expanded | Nav bar width: expanded |
--rui-modal-backdrop | Background color for backdrop displayed behind modals |
--rui-modal-border | Border displayed around modals |
--rui-modal-title-bg | Background color of title in modals |
--rui-notification-error-accent | Accent color for Error notifications |
--rui-notification-error-bg | Background color for Error notifications |
--rui-notification-error-border | Border color for Error notifications |
--rui-notification-error-close-btn | Close button color for Error notifications |
--rui-notification-error-fg | Foreground color for Error notifications |
--rui-notification-info-accent | Accent color for Information notifications |
--rui-notification-info-bg | Background color for Information notifications |
--rui-notification-info-border | Border color for Information notifications |
--rui-notification-info-close-btn | Close button color for Information notifications |
--rui-notification-info-fg | Foreground color for Information notifications |
--rui-notification-success-accent | Accent color for Success notifications |
--rui-notification-success-bg | Background color for Success notifications |
--rui-notification-success-border | Border color for Success notifications |
--rui-notification-success-close-btn | Close button color for Success notifications |
--rui-notification-success-fg | Foreground color for Success notifications |
--rui-notification-warning-accent | Accent color for Warning notifications |
--rui-notification-warning-bg | Background color for Warning notifications |
--rui-notification-warning-border | Border color for Warning notifications |
--rui-notification-warning-close-btn | Close button color for Warning notifications |
--rui-notification-warning-fg | Foreground color for Warning notifications |
--rui-outline-offset-anchor | Distance between anchor elements and their focus outline |
--rui-outline-offset-btn | Distance between button elements and their focus outline |
--rui-outline-style | Focus outline style |
--rui-outline-width | Focus outline width |
--rui-password-strength-meter-medium-bg | Background color for medium-strength password strength meters |
--rui-password-strength-meter-strong-bg | Background color for strong-strength password strength meters |
--rui-password-strength-meter-text-shadow | Text shadow for password strength meter text |
--rui-password-strength-meter-weak-bg | Background color for weak-strength password strength meters |
--rui-percentage-circle-data-active | Background color for the active section in percentage circles |
--rui-percentage-circle-data-bg | Background color for the center section behind the text in percentage circles |
--rui-percentage-circle-data-inactive | Background color for the inactive section in percentage circles |
--rui-popup-bg | Background color for popups |
--rui-popup-border | Border color for popups |
--rui-popup-border-radius | Border radius for popups |
--rui-popup-content-bg | Background color for popups with user content |
--rui-popup-content-border | Border color for popups with user content |
--rui-popup-content-fg | Foreground color for popups with user content |
--rui-popup-fg | Foreground color for popups |
--rui-popup-header-separator | Color for popup separators (in header dropdowns) |
--rui-popup-menu-option-padding | Padding around dropdown menu options |
--rui-popup-menu-padding | Padding around content in popup button dropdown menu |
--rui-popup-menu-separator | Color for popup separators |
--rui-scrollbar-thumb | Background color for function view scrollbar thumb |
--rui-scrollbar-track | Background color for function view scrollbar track |
--rui-search-box-bg | Background color for header search box |
--rui-search-box-border | Border color for header search box |
--rui-search-box-box-shadow | Box shadow for header search box |
--rui-search-box-button-bg | Background color for search button in header search box |
--rui-search-box-button-bg-hover | Background color for search button in header search box when hovered |
--rui-search-box-button-fg | Foreground color for search button in header search box |
--rui-search-box-button-fg-hover | Foreground color for search button in header search box when hovered |
--rui-search-box-fg | Foreground color for header search box |
--rui-search-box-watermark | Watermark color for header search box |
--rui-slide-up-bg | Background color for slide-ups |
--rui-slider-thumb | Background color for slider thumb |
--rui-slider-thumb-focused | Background color for slider thumb when focused |
--rui-slider-track | Background color for slider track |
--rui-splitter-bg | Color for splitters between display blocks using fixed layout |
--rui-subheader-text | Color for subheader text |
--rui-subheader-tooltip | Color of icon when used in subheader |
--rui-table-footer-bg | Background color for footers in responsive tables and grids that use the striped appearance |
--rui-table-header-bg | Background color for headers in responsive tables and grids that use the striped appearance |
--rui-table-row-border | Row border in responsive tables and grids |
--rui-table-stripe-bg | Background color for alternating rows in responsive tables and grids that use the striped appearance |
--rui-table-stripe-fg | Foreground color for alternating rows in responsive tables and grids that use the striped appearance |
--rui-text-bright | Color for bright text |
--rui-text-disabled | Color for disabled text |
--rui-text-error | Color for error text |
--rui-text-help | Color for help text |
--rui-text-highlight | Background color behind highlighted record detail rows |
--rui-text-regular | Color for regular text |
--rui-tile-alt1-bg | Background color for tiles with the Alternate1 appearance |
--rui-tile-alt1-bg-hover | Background color for tiles with the Alternate1 appearance when hovered |
--rui-tile-alt1-fg | Foreground color for tiles with the Alternate1 appearance |
--rui-tile-alt2-bg | Background color for tiles with the Alternate2 appearance |
--rui-tile-alt2-bg-hover | Background color for tiles with the Alternate2 appearance when hovered |
--rui-tile-alt2-fg | Foreground color for tiles with the Alternate2 appearance |
--rui-tile-alt3-bg | Background color for tiles with the Alternate3 appearance |
--rui-tile-alt3-bg-hover | Background color for tiles with the Alternate3 appearance when hovered |
--rui-tile-alt3-fg | Foreground color for tiles with the Alternate3 appearance |
--rui-tile-highlighted-bg | Background color for tiles with the Highlighted appearance |
--rui-tile-highlighted-bg-hover | Background color for tiles with the Highlighted appearance when hovered |
--rui-tile-highlighted-fg | Foreground color for tiles with the Highlighted appearance |
--rui-toast-bg | Background color for popup notifications |
--rui-toast-close-button-border | Border color for buttons in popup notifications |
--rui-toast-close-button-fg | Foreground color for buttons in popup notifications |
--rui-toast-fg | Foreground color for popup notifications |
--rui-toggle-thumb-bg | Background color for toggle thumb |
--rui-toggle-track-border | Border color for toggle track |
--rui-toolbar-floating-bg | Background color for floating toolbar |
--rui-toolbar-function-bg | Background color for function toolbar |
--rui-toolbar-separator-bg-function | Color for function toolbar separators |
--rui-well-bg | Background color for wells |
--rui-well-border | Border color for wells |