Skip to content

[Bug]: card-mod-more-info-yaml completely ignored in HA 2026.3 - no <card-mod> element injected ? #595

Description

@LordeXf

My Home Assistant Version

Home Assistant Core: 2026.3.0
Card-mod: 4.2.1
Frontend: 20260228.0
Lovelace configuration: YAML (theme-based)

My card-mod installation method

HACS

My lovelace configuration method

YAML

What I am doing

I'm trying to vertical center more-info-yaml popups in theme.yaml with the new core.

This is what I had before, and it was working:

card-mod-more-info-yaml: |
   $: |
     .mdc-dialog__container {
       display: flex !important;
       justify-content: center !important;
       align-items: center !important;
     }

card-mod-more-info-yaml does not work in Home Assistant 2026.3+?
Card-mod fails to inject ANY <card-mod> element into the more-info dialog DOM, making it impossible to apply custom styles to more-info dialogs.

Browser Mod custom popups is working:

browser_mod:
  service: browser_mod.popup
  data:
    popup_styles:
      - style: all
        styles: |
          ha-dialog {
            --dialog-surface-margin-top: auto !important;
          }

Browser Mod popups can be styled and centered.

What seems to not working:

Any card-mod-more-info-yaml targeting

  • Root element targeting (:host, .)
  • Shadow DOM chains ($ $ $)
  • Internal element targeting (ha-more-info-info $)
  • Debug mode (card-mod-more-info-yaml with debug)

Nothing creates a <card-mod> element in more-info dialogs.

What I expect to happen

When card-mod-more-info-yaml is defined in a theme, card-mod should:

  1. Inject a <card-mod> element into the more-info dialog's shadow DOM
  2. Apply the specified styles to the dialog and its children
  3. Allow customization of dialog positioning, appearance, and behavior

February 2026 (3 weeks ago) - Users still using old .mdc-dialog syntax, suggesting recent breaking change.

What happened instead

Actual Behavior

Card-mod does NOT inject any <card-mod> element whatsoever into <ha-more-info-dialog>.

Minimal steps to reproduce

Minimal Reproduction

themes/test.yaml:

test-theme:
  card-mod-theme: test-theme
  
  # These work fine on more-info dialogs ✅
  ha-dialog-scrim-backdrop-filter: blur(2px)
  mdc-dialog-scrim-color: rgba(0,0,0,0.05)
  ha-dialog-border-radius: 12px
  dialog-box-shadow: 0px 10px 30px 5px rgba(0, 0, 0, 0.3)
  
  # This is completely ignored - no  element created ❌
  card-mod-more-info-yaml: |
    $: |
      :host {
        --test-variable: red !important;
      }

Steps to reproduce:

  1. F12 → Inspect <ha-more-info-dialog>
  2. Search for <card-mod> element
  3. Result: NOT FOUND

Include any yaml code here

## All Attempted Solutions (ALL FAILED)

# Attempt 1: Simple root targeting
card-mod-more-info-yaml: |
  $: |
    :host {
      --test: red;
    }

# Attempt 2: Direct dialog targeting
card-mod-more-info-yaml: |
  ha-dialog $ wa-dialog $: |
    dialog {
      margin: auto !important;
    }

# Attempt 3: Full shadow DOM chain
card-mod-more-info-yaml: |
  ha-adaptive-dialog $ ha-dialog $ wa-dialog $: |
    dialog {
      top: 50% !important;
      transform: translateY(-50%) !important;
    }

# Attempt 4: Broken chain (per troubleshooting docs)
card-mod-more-info-yaml: |
  ha-adaptive-dialog $:
    ha-dialog $:
      wa-dialog $: |
        dialog {
          margin: auto !important;
        }

# Attempt 5: Targeting internal elements
card-mod-more-info-yaml: |
  ha-more-info-info $ more-info-content $: |
    .container {
      color: red !important;
    }

Error messages from the browser console

By checking each box below I indicate that I ...

  • Understand that this is a channel for reporting bugs, not a support forum (https://community.home-assistant.io/).
  • Have made sure I am using the latest version of the plugin.
  • Have searched Home Assistant logs for any relevant card-mod errors or warnings.
  • Have followed the troubleshooting steps of the "Common Problems" section of https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins.
  • Understand that failure to follow the template above may increase the time required to handle my bug-report, or cause it to be closed without further action.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions