You can bypass this by setting a specific class to your expansion panel and then doing something like this in styles css.
Mat expansion panel.
Mat expansion panel header represents the header section.
Let s discuss accordion directives which are used in a template to build an expansion panel component.
The mat expansion panel an angular directive is used to create an expandable detail v s summary view.
This will remove the padding but be careful as it will remove it from all of the mat expansion panel body elements.
Matexpansionpanel provides an expandable details summary view.
The expansion panel is created by adding the mat expansion panel element directive as a wrapper for each panel.
Mat panel title represents the panel title.