Different browsers handle nested backdrop-filter elements differently:
-
Chrome/Chromium: Has a bug where child
backdrop-filtereffects are removed when nested within parent elements that also havebackdrop-filter- Bug: https://issues.chromium.org/issues/40835530
- Status: Won't Fix (marked as "per-spec" by Chrome team)
-
Firefox: Requires parent elements to have
backdrop-filterfor childbackdrop-filterelements to work properly- This is the opposite behavior from Chrome's bug
chat-input (backdrop-filter OR no backdrop-filter?)
└── .model-menu (backdrop-filter: blur(12px))
-
With backdrop-filter on chat-input:
- ✅ Firefox: model-menu blur works
- ❌ Chrome: model-menu blur blocked
-
Without backdrop-filter on chat-input:
- ❌ Firefox: model-menu blur doesn't work
- ✅ Chrome: model-menu blur works
/* Firefox-specific: Enable backdrop-filter for child elements to work */
@supports (-moz-appearance: none) {
backdrop-filter: blur(80px);
-webkit-backdrop-filter: blur(80px);
background: rgba(37, 37, 37, 0.7);
}/* Chrome-specific: Use more opaque background when backdrop-filter may not work */
@supports (-webkit-appearance: none) and (not (-moz-appearance: none)) {
background: rgba(29, 29, 29, 0.95);
border: 1px solid rgba(90, 90, 90, 0.4);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}- Default State: No backdrop-filter on
chat-input(Chrome-friendly) - Firefox Detection: Uses
@supports (-moz-appearance: none)to detect Firefox and enable backdrop-filter - Chrome Enhancement: Uses
@supports (-webkit-appearance: none) and (not (-moz-appearance: none))to detect Chrome and provide enhanced styling without relying on backdrop-filter
- Parent
chat-inputhas backdrop-filter ✅ - Child
.model-menubackdrop-filter works ✅
- Parent
chat-inputhas no backdrop-filter ✅ - Child
.model-menubackdrop-filter works ✅ - Enhanced visual styling with shadows and opacity ✅
- Should work like Chrome (WebKit-based)
- Fallback to enhanced styling
- ✅ Chrome/Chromium (all versions)
- ✅ Firefox (all modern versions)
- ✅ Safari (all modern versions)
- ✅ Edge (Chromium-based)
This solution provides optimal visual experience across all major browsers while working around their different backdrop-filter implementations.