# dialog closedby="any" (light-dismiss dialogs)

Status: Chrome 134, Firefox 137; Safari not yet (blocked since July 2025, Interop 2026 item).  
Source: https://web-platform-dx.github.io/web-features-explorer/features/dialog-closedby/  
Page: https://designforai.dev/css/dialog-closedby-any

Declares how a `<dialog>` may close: `any` (Escape, click outside, or programmatic), `closerequest` (Escape only), `none`. Gives modals the popover-style light-dismiss they were missing.

## HTML

```html
<button onclick="document.getElementById('fx-043').showModal()">Open sheet</button>
<dialog id="fx-043" class="fx-043" closedby="any"><p>Click outside to close.</p></dialog>
```

## CSS

```css
.fx-043 {
  border: 0;
  border-radius: 16px 16px 0 0;
  padding: 24px;
  width: min(480px,100%);
  margin: auto 0 0;
  font-family: system-ui
}
.fx-043::backdrop {
  background: #0005
}
.fx-043 :is(a,button,input,select,textarea):focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
```

Fallback: Add a click handler on the dialog that closes it when `e.target === dialog` for Safari.

## Prompt

Give modal dialogs `closedby="any"` for click-outside dismissal and `closedby="none"` for blocking confirmations. Keep a 3-line backdrop-click fallback for Safari (as of 2026-09), and never emulate dialogs with divs.
