Skip to main content
Writing custom CSS · Activator parts · Chat shell parts · Message and content parts · Overlay parts

CSS Custom Properties

The chat widget’s theme system generates CSS custom properties that you can reference in custom CSS rules. These properties are grouped into sizing tokens (which can be overridden directly) and color tokens (which are generated from widget settings).

Sizing and Typography

These properties correspond to dashboard settings but can also be overridden in custom CSS when finer control is needed. They are set on the Remark element itself, so override them on [data-remark] or a specific element such as remark-qa-activator. --hem stands for “host em” — it serves the same role as rem but is scoped to the widget’s shadow DOM root rather than the page’s <html> element. This means the widget’s typography scales independently of the host page’s font size. Typography tokens use --hem as their base unit. Adjust the dashboard font size or override --hem to scale the widget, and use the emitted --remark-font-sizes-* variables for individual sizes.
--hem is already responsive to the host page’s root font size. If your site already adjusts font-size on <html> for different viewports, the widget may scale along with it automatically depending on your configuration.

Distance from the Screen Edge

The floating chat and its activator sit a fixed distance from the viewport edge, controlled by two custom properties. Both default to 24px and are independent of --remark-spacing-multiplier, which scales spacing inside the widget. Set them on remark-chat-widget to move the activator and the open chat panel together. To move only one, scope the override to its part — ::part(activator-parent) for the activator, ::part(app-parent) for the open chat panel:
This applies to the floating chat only; the embedded chat follows normal page flow. On mobile, the open chat panel fills the screen and ignores the bottom distance, but the activator still respects it. At the full height size, the open panel docks to the screen edge on larger screens and ignores both distances.

Button Activator Size and Shape

These custom properties set the size and shape of the floating button activator and its unread count badge. Both sizes scale with --hem, so the defaults are 48px and 20px at the default font size. Set the variables on remark-chat-widget, or on ::part(activator-parent) to change only the activator. The count badge sits on the button’s rounded corner and follows it to any size or radius:
The badge takes its position from the variables on activator-parent. A border-radius, size, or variable set directly on ::part(activator-button) reshapes the button without moving the badge.

Colors

Color tokens are generated from the brand color and palette overrides configured in the dashboard. They follow the naming pattern --remark-colors-{name} and have separate light and dark mode values. These tokens are set on the Remark element. You can reference them in ::part() rules, but to change colors, use the dashboard palette settings rather than overriding variables directly. The element carries the active color scheme as data-color-scheme, either light or dark. Add it to the element selector to style one scheme only:

Content

Backgrounds

Borders

Brand

Action

These correspond to the Button color override in the dashboard.

Status

Elevated Surfaces

Overlays and Inverse