Is this a regression?
The previous version in which this bug was not present was
No response
Description
According to the docs and TS definition, the panelClass should add be added to the bottomsheet container:
/** Extra CSS classes to be added to the bottom sheet container. */
docs: https://material.angular.dev/components/bottom-sheet/api
However, it seems to be added to the cdk-overlay-pane class (direct parent) and not to the mat-bottom-sheet-container element.
Looking at the generated HTML:
<mat-bottom-sheet-container tabindex="-1" class="mat-bottom-sheet-container cdk-dialog-container mat-bottom-sheet-container-medium mat-bottom-sheet-container-animations-enabled mat-bottom-sheet-container-enter"
the bottom-sheet-container is using a class mat-bottom-sheet-container-medium and it would be amazing to use panelClass to apply mat-bottom-sheet-container-large. This works if you add it manually via Chrome Dev Tools.
Reproduction
StackBlitz link: https://stackblitz.com/edit/jbfptqex?file=src%2Fexample%2Fbottom-sheet-overview-example.ts&startScript=start
Steps to reproduce:
- Run the stackblitz
- Inspect the HTML in Dev Tools and see that the panelClass value get added to the DIV with class
cdk-overlay-pane, not to the mat-bottom-sheet-container .
Expected Behavior
If docs says :
/** Extra CSS classes to be added to the bottom sheet container. */
then I expect the class to be added to that mat-bottom-sheet-container element
Actual Behavior
It gets added to the parent div with class cdk-overlay-pane
Environment
- Angular: 21.2.7
- CDK/Material: lastest
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Macos
Is this a regression?
The previous version in which this bug was not present was
No response
Description
According to the docs and TS definition, the
panelClassshould add be added to the bottomsheet container:/** Extra CSS classes to be added to the bottom sheet container. */docs: https://material.angular.dev/components/bottom-sheet/api
However, it seems to be added to the
cdk-overlay-paneclass (direct parent) and not to themat-bottom-sheet-containerelement.Looking at the generated HTML:
the bottom-sheet-container is using a class
mat-bottom-sheet-container-mediumand it would be amazing to usepanelClassto applymat-bottom-sheet-container-large. This works if you add it manually via Chrome Dev Tools.Reproduction
StackBlitz link: https://stackblitz.com/edit/jbfptqex?file=src%2Fexample%2Fbottom-sheet-overview-example.ts&startScript=start
Steps to reproduce:
cdk-overlay-pane, not to the mat-bottom-sheet-container .Expected Behavior
If docs says :
/** Extra CSS classes to be added to the bottom sheet container. */then I expect the class to be added to that
mat-bottom-sheet-containerelementActual Behavior
It gets added to the parent div with class
cdk-overlay-paneEnvironment