Skip to content

Allow message bubbles variables override in config.json for custom themes #18408

@benneti

Description

@benneti

When using a custom theme in element, it would be nice to set the bubble colors to match the theme. Right now it seems to always fall back to the light theme (even for dark themes).

Describe the solution you'd like.

Override bubble colors in custom themes, i.e.:

{
  "showLabsSettings": true,
  "settingDefaults": {
    "custom_themes": [
      {
        "name": "Dracula",
        "is_dark": true,
        "fonts": {
          "faces": [
            {
              "font-family": "Fira Sans"
            }
          ],
          "general": "Fira Sans",
          "monospace": "Fira Code"
        },
        "colors": {
          "accent-color": "#bd93f9",
          "primary-color": "#bd93f9",
          "warning-color": "#ff5555",
          "sidebar-color": "#1e1f29",
          "roomlist-background-color": "#1e1f29",
          "roomlist-text-color": "#f8f8f2",
          "roomlist-text-secondary-color": "#f8f8f2",
          "roomlist-highlights-color": "#00000030",
          "roomlist-separator-color": "#4d4d4d90",
          "timeline-background-color": "#282A36",
          "timeline-text-color": "#f8f8f2",
          "timeline-text-secondary-color": "#ff79c6",
          "timeline-highlights-color": "#00000030",
          "eventbubble-self-bg": "#6272a4",
          "eventbubble-others-bg": "#1e1f29",
          "eventbubble-bg-hover": "#44475a",
          "eventbubble-reply-color": "#6272a4",
          "avatar-background-colors": [
            "#8be9fd", "#50fa7b", "#ffb86c", "#ff79c6", "#bd93f9", "#ff5555", "#f1fa8c", "#6272a4"
          ],
          "reaction-row-button-selected-bg-color": "#bd93f9"
        }
      }
    ],
    "useCustomFontSize": true,
    "theme": "custom-Dracula"
  },
  "default_theme": "custom-Dracula",
}

Shamelessly taggin @gsouquet as he seems to have implemented the relevant parts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-Message-BubblesA-Themes-CustomCustom theme variables or supportO-UncommonMost users are unlikely to come across this or unexpected workflowS-MajorSeverely degrades major functionality or product features, with no satisfactory workaroundT-Enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions