Files
next.js/test/e2e/app-dir/dev-overlay/portal-not-affect-parent/app/page.tsx
2950dae1e0 [DevOverlay] fix: shadow host element affects parent's display (#70676)
### Why?

Although the style applied to the shadow host is isolated, the element
that attached the shadow host (i.e. `nextjs-portal`) is still affected
by the parent's style (e.g. `body`). This may occur style conflicts like
`display: flex`, with other children elements therefore give the shadow
host an absolute position.

Fixes #70675
Closes NDX-640

---------

Co-authored-by: samcx <[email protected]>
Co-authored-by: devjiwonchoi <[email protected]>
2025-01-29 03:22:45 +09:00

13 lines
249 B
TypeScript

export default function Page() {
return (
<>
<div id="div1" style={{ background: 'pink', width: 100 }}>
div 1
</div>
<div id="div2" style={{ background: 'cyan', width: 100 }}>
div 2
</div>
</>
)
}