Style variables

Style variables

This document explains how to use variables in Mosaic for consistent style management across your website, covering colors, fonts, spacing, radius, and sizes. It details how to organize variables into collections and groups, and how to manage, update, and apply them.

Style variables in Mosaic serve as a centralized style management toolkit. They store frequently used styles such as colors, fonts, spacing, radius, and sizes. By using style variables, you can achieve consistent design across your entire website and easily update multiple elements simultaneously. This is especially useful when working on large sites where design consistency is essential.

These variables are accessible from the Top panel’s settings in any Editor, where you can manage them via the Style variables right-side panel.

Variables section highlighted in Mosaic’s Top panel settings

Collections

Style variables sidebar in Mosaic displaying Collections, used to organize related variables by type

Collections are used to organize style variables into related groups. Collections can hold all style variables of the type or types you choose, ensuring better customization and accessibility.

By default, the following collections are available:

  • Color
  • Font
  • Radius
  • Spacing
  • Size

Color

Color variables store hex or RGB-based colors and support Light and Dark modes by default. These variables are ideal for managing themes and palettes.

Font

You can easily shape the typography of your web pages by creating a list of fonts. Making changes to these fonts later will dynamically update them wherever they are selected. Fonts can be sourced from Google fonts and Custom fonts.

Google fonts

Select from the Google Fonts library. It has the following settings:

  • Name: Give your font a clear and memorable name for easy identification.
  • Provider: Choose Google if you’re selecting from the Google Fonts library.
  • Font family: Browse and pick from the extensive list of Google Fonts.
  • Font variants: Select the desired font weights.
  • Fallback fonts: Specify alternative font families in case your chosen Google font encounters loading issues.
  • Usage (Optional): Decide where the font will be applied, such as headings, body text, or specific UI elements.
  • CSS custom property (Optional): Define a custom property if you want to easily reuse the font.
Custom fonts

Upload and apply custom fonts using the @font-face code. Make sure the font-family name matches across the Font family field and the @font-face code. It has the following settings:

  • Name: Give a name that helps identify your font.
  • Provider: Select Custom here to load your own font.
  • Font family: The font family name of your font.
  • Font faces: It requires a small piece of code, commonly known as the font-face code, to load your chosen font.
  • Fallback fonts: Specify an alternative font family in case your chosen font faces loading issues.
  • Usage (Optional): Decide where the font will be applied, such as headings, body text, or specific UI elements.
  • CSS custom property (Optional): Define a custom property if you want to easily reuse the font.

Radius

Radius variables are used to control corner rounding. Accepts whole numbers or decimals.

Spacing

Spacing variables are used for margins, paddings, and gaps. Accepts whole numbers or decimals.

Size

Size variables define width, height, or other dimension-related properties. Accepts whole numbers or decimals.

Manage collections

Collections can be edited or created by clicking the Edit collections button in the dropdown.

Mosaic’s collections panel, allowing users to manage and organize variable collections

The options available include:

  • Add collection: Click the + button to create a new collection. This will open a panel where you can define settings for the new collection.
Plus button highlighted in Mosaic’s Collections panel for adding a new collection, opening configuration options for grouping variables
  • Delete collection: Use the trash icon in the collection dropdown to remove any of them.
Trash icon highlighted in Mosaic’s collections panel dropdown for deleting a selected variable collection
  • Collection name: Modify the name of an existing collection.
  • Manage modes: Add, edit, or remove modes associated with collections. Most collections have a default mode. You can create new modes or edit existing ones, which will open a popup for customization, where you can name it and provide an icon for it.
Manage modes popup in Mosaic allowing users to add, rename, or remove modes for variable collections with name and icon customization
  • Manage skins: Add, edit, or remove skins linked to your theme. Each skin can have a name and an icon, the same way modes can.
  • Preferred types: Specify which variable types are prioritized when choosing style variables for properties in the Style tab.
Preferred types dropdown in Mosaic’s Style variables panel for prioritizing variable types

Groups

Groups highlighted in Mosaic’s Style variables panel, used to categorize variables within collections for better design organization

Groups provide further organization within collections, allowing you to categorize style variables (e.g.: background, text, and border colors). This structure helps keep your design decisions clear and manageable.

Manage groups

  • Creating groups: Click the folder icon to create groups. The new group will appear at the bottom of your style variables list. Drag and drop to rearrange it.
Folder icon highlighted in Mosaic’s Style variables panel for creating a new group
  • Editing/deleting groups: Use the three-dot menu next to a group name to rename or delete it.
Three-dot context menu in Mosaic’s Style variables panel next to a group name, providing options to rename or delete the group
Notice

Deleting a group will replace all instances of its style variables with static values throughout your theme. A confirmation popup will remind you of this consequence.

Confirmation popup in Mosaic warning that deleting a group will replace all its variables with static values across the theme

Manage variable list

Style variables can be added, edited, or removed via the Style variables panel.

  • Adding style variables: Use the appropriate collection or group to create new style variables using the + button for each.
Plus button highlighted in Mosaic’s variables panel for adding new variables within a selected collection or group
  • Editing style variables: Click on a style variable to modify it in their popup window. Any changes will update globally wherever the style variable is used.
Variable editing popup in Mosaic allowing users to modify a variable’s settings
  • Removing style variables: Hover over a style variable to reveal the trash icon, then click to delete.
Trash icon highlighted next to a variable in Mosaic’s variables panel, used to delete the selected variable from the collection
Notice

Just like with a group, deleting a style variable will replace all instances of its variables with static values throughout your theme. A confirmation popup will remind you of this consequence.

Confirmation popup in Mosaic warning that deleting a variable will replace all its instances with static values across the theme
  • Reordering style variables: Drag and drop style variables to change their order.

Update in the Style tab

Updating style variables directly from the Style tab is quick and straightforward. When you hover over a property that supports style variables, a style variable icon will appear next to the property name.

Style variable icon highlighted in Mosaic’s Backgound settings section, appearing next to supported properties

Clicking on this icon opens a popup window where you can see and choose from available style variables.

Popup window in Mosaic opened from the style variable icon, displaying a list of available variables for linking to the selected property

Additionally, hovering over a style variable in this popup window will display the specific settings applied to that variable.

Tooltip preview in Mosaic’s variable selection popup showing detailed settings applied to each variable on hover

Select/create variables

When the popup window opens, you’ll first see style variables from your preferred collection type. You can switch between collections by clicking on the type name.

Collection type dropdown highlighted in Mosaic’s variable selection popup, allowing users to switch between different variable collections

To add a new style variable, simply click the + button.

Plus button highlighted in Mosaic’s variable selection popup for quickly adding a new variable to the selected collection

If you want to organize style variables into groups or reorder them by dragging and dropping them, you’ll need to open the Style variables panel by clicking the cog icon.

Cog icon highlighted in Mosaic’s variable selection popup for accessing the Style variables panel to manage and organize variables

For Color variables, you can switch between two viewing modes by clicking the middle icon in the top right corner:

View mode icon highlighted in Mosaic’s variable panel for switching between color variable display layouts
  • A simple view displaying only the colors.
  • A detailed view that shows both colors and their names, making it easier to identify the right one.

Edit variables

To edit a style variable’s name or value, hover over the variable and click the pencil icon.

Edit icon highlighted in Mosaic’s variable list

This opens the same popup you see in the Style variables panel when selecting a style variable, allowing you to easily adjust its details. Any changes made here are applied globally, so every element linked to that variable will update instantly across your entire site.

Variables in interactions

Interactions can use style variables for properties like:

  • Size
  • Radius
  • Spacing
  • Color
Mosaic Toolbar showing interaction settings that support variable usage for properties

Interactions also support Variable modes, which allow elements to change their appearance based on the active mode.

Mosaic Toolbar displaying interaction settings with support for Variable modes, enabling style changes

FAQ

Last updated: September 11, 2025

Still have more questions? Let us help!

We use cookies to improve your experience, analyze traffic, and personalize content. By clicking "Accept all" you agree to storing them on your device. Read our privacy policy.

Accept all
Reject all