On this page
Style dialogs and feedback
Match alerts, messages and controls to your theme.
Before you begin: Switch light and dark mode.
Style FQL’s Built-in UI
Your skin can also style the interfaces Frontbacked provides for your pages, including alerts, confirmation dialogs, validation messages, toasts and pagination. Declare the supported CSS custom properties in :root inside each skin stylesheet. You can connect them to your existing design tokens; you do not need JavaScript or a replacement dialog.
Frontbacked does not guess your brand colors from the page. It uses the variables you supply and keeps its defaults for any you omit. For example, the alert’s primary button is dark charcoal by default. To use your theme’s primary color instead:
This also styles the Got it button in the automatic site-unavailable notice. FQL shows that notice when site services are unavailable, after its active requests settle; your theme does not need to create the alert. Styling changes its appearance, not when it appears or what it says.
Alerts, Dialogs and Messages
These variables style the shared feedback UI. Alert and confirmation surfaces use the alert colors, message types use their matching status palette, and primary feedback buttons use the button colors. They do not recolor every button or field on your website.
| Variable | Default | Controls |
|---|---|---|
--fb-feedback-font | inherit | Feedback font family. |
--fb-feedback-radius | 0.5rem | Inline message and toast corner radius; not the alert panel radius. |
--fb-feedback-z-index | 2147483647 | Feedback overlay stacking level. Usually leave unchanged. |
--fb-feedback-alert-bg | #ffffff | Alert and confirmation panel background. |
--fb-feedback-alert-text | #111827 | Alert and confirmation text. |
--fb-feedback-alert-overlay | rgba(17, 24, 39, 0.55) | Backdrop behind an alert or confirmation. |
--fb-feedback-button-bg | #111827 | Primary feedback button background. |
--fb-feedback-button-text | #ffffff | Primary feedback button text. |
Set status backgrounds, borders and text together so messages remain readable:
| Message type | Background variable / default | Border variable / default | Text variable / default |
|---|---|---|---|
| Error | --fb-feedback-error-bg: #fef2f2 | --fb-feedback-error-border: #fecaca | --fb-feedback-error-text: #b91c1c |
| Warning | --fb-feedback-warning-bg: #fffbeb | --fb-feedback-warning-border: #fde68a | --fb-feedback-warning-text: #92400e |
| Information | --fb-feedback-info-bg: #eff6ff | --fb-feedback-info-border: #bfdbfe | --fb-feedback-info-text: #1d4ed8 |
| Success | --fb-feedback-success-bg: #ecfdf3 | --fb-feedback-success-border: #a7e8c2 | --fb-feedback-success-text: #146339 |
Light and Dark Skin Example
Define a palette in each mode’s CSS file. The selected skin stylesheet supplies the values, so the feedback UI follows mode changes too.
Check normal, hover, focus, selected, disabled and loading states in every mode. Keep body text at least 4.5:1 against its background and make focus indicators easy to see. Use a readable foreground for each actual background; white text on a pale status background is usually difficult to read. The variables above do not provide separate hover or focus palettes.
Pagination and Support Buttons
FQL-generated pagination has its own variables:
| Variable | Default | Controls |
|---|---|---|
--frontbacked-pagination-bg | transparent | Page button background. |
--frontbacked-pagination-border | currentColor | Page button border. |
--frontbacked-pagination-color | inherit | Page button text. |
--frontbacked-pagination-active-bg | #111827 | Selected page background. |
--frontbacked-pagination-active-border | #111827 | Selected page border. |
--frontbacked-pagination-active-color | #ffffff | Selected page text. |
The support launcher uses --frontbacked-support-launcher-bg (default #b12868) and --frontbacked-support-launcher-bg-2 (default #6d5163) for its gradient and the native support channel icon. Its icon stays white, so choose colors with enough contrast against white.
Each interface has its own styling controls. The feedback variables do not style the payment widget, upload recovery panel or site admin. Use the Admin Colors section below for the site admin.
Admin Colors
The site admin follows the selected skin. Light and dark modes are shared with the site, and switching mode keeps open forms intact.
Skins using the example themes' color variables work automatically. You can also define these optional variables to give the admin its own matching palette:
Keep action text readable against both accent colors. Admin colors do not change the admin's page structure or navigation.