v149 · CSS · demo
Focus-Within Dialog Boundary
A form tracks :focus-within with a blue highlight. In Chrome 149, focusing inside an open <dialog> no longer triggers the outer form's :focus-within style.
Outer form — background changes on :focus-within
form :focus-within
—
focus location
none
/* Outer container highlights when any descendant is focused */
.outer-form:focus-within {
background: var(--bg-ivory);
box-shadow: var(--flat-shadow);
}
/* Chrome 149: focusing inside <dialog> does NOT
propagate :focus-within to .outer-form,
because dialog is a top-layer element (boundary). */
dialog input:focus {
outline: 3px solid var(--accent-blue);
/* :focus-within stops here; doesn't reach .outer-form */
}
see also
- Hover Boundary Demo — same concept with :hover and popover
- Back to feature index
- ChromeStatus entry
implementation reference
Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗