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:
- Inject a
<card-mod> element into the more-info dialog's shadow DOM
- Apply the specified styles to the dialog and its children
- 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:
- F12 → Inspect
<ha-more-info-dialog>
- Search for
<card-mod> element
- 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 ...
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-yamldoes 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 popups can be styled and centered.
What seems to not working:
Any
card-mod-more-info-yamltargeting:host,.)$ $ $)ha-more-info-info $)card-mod-more-info-yamlwith debug)Nothing creates a
<card-mod>element in more-info dialogs.What I expect to happen
When
card-mod-more-info-yamlis defined in a theme, card-mod should:<card-mod>element into the more-info dialog's shadow DOMFebruary 2026 (3 weeks ago) - Users still using old
.mdc-dialogsyntax, 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:
Steps to reproduce:
<ha-more-info-dialog><card-mod>elementInclude any yaml code here
Error messages from the browser console
By checking each box below I indicate that I ...