From cd3364c4845f844afd5fbe80dc9b24c3498b9467 Mon Sep 17 00:00:00 2001 From: Juan-C-Ceballos Date: Sun, 14 Jun 2026 22:14:06 -0300 Subject: [PATCH 1/2] [docs] Clarify container prop inheritance for Shadow DOM --- docs/data/material/customization/shadow-dom/shadow-dom.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/data/material/customization/shadow-dom/shadow-dom.md b/docs/data/material/customization/shadow-dom/shadow-dom.md index 6a698c6ad3ea7e..bb33b6924f4c60 100644 --- a/docs/data/material/customization/shadow-dom/shadow-dom.md +++ b/docs/data/material/customization/shadow-dom/shadow-dom.md @@ -64,6 +64,14 @@ const theme = createTheme({ ; ``` +The `container` prop only needs to be set on the three components that render through the `Portal` directly: `Modal`, `Popover`, and `Popper`. +Higher-level components are built on top of these and inherit the default automatically—for example, `Dialog` and `Drawer` render a `Modal`, `Menu` renders a `Popover`, and `Tooltip` and `Autocomplete` render a `Popper`. + +:::info +You don't need to set `container` on `Dialog`, `Menu`, or other higher-level components. +Each one renders one of the base components internally, and that base component reads its own default props (`MuiModal`, `MuiPopover`, or `MuiPopper`) when it renders, so the example above already covers them. +::: + ### 3. CSS theme variables (optional) :::info From dea47fd562214d52cddf8f8550ead90d77ab1150 Mon Sep 17 00:00:00 2001 From: Juan-C-Ceballos Date: Wed, 17 Jun 2026 13:00:24 -0300 Subject: [PATCH 2/2] [docs] Summarize the clarification of container property inheritance for Shadow DOM --- docs/data/material/customization/shadow-dom/shadow-dom.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/docs/data/material/customization/shadow-dom/shadow-dom.md b/docs/data/material/customization/shadow-dom/shadow-dom.md index bb33b6924f4c60..a5713d4a6de885 100644 --- a/docs/data/material/customization/shadow-dom/shadow-dom.md +++ b/docs/data/material/customization/shadow-dom/shadow-dom.md @@ -64,13 +64,7 @@ const theme = createTheme({ ; ``` -The `container` prop only needs to be set on the three components that render through the `Portal` directly: `Modal`, `Popover`, and `Popper`. -Higher-level components are built on top of these and inherit the default automatically—for example, `Dialog` and `Drawer` render a `Modal`, `Menu` renders a `Popover`, and `Tooltip` and `Autocomplete` render a `Popper`. - -:::info -You don't need to set `container` on `Dialog`, `Menu`, or other higher-level components. -Each one renders one of the base components internally, and that base component reads its own default props (`MuiModal`, `MuiPopover`, or `MuiPopper`) when it renders, so the example above already covers them. -::: +The `container` prop only needs to be set on the base components that render directly through the `Portal`: `Modal`, `Popover`, and `Popper`. Higher-level components (like `Dialog`, `Menu`, or `Tooltip`) render these base components internally and inherit the container prop automatically. ### 3. CSS theme variables (optional)