I'm using MatExpansionPanel from Angular Material. When I inspected the generated html I got something like this
<mat-expansion-panel _ngcontent-lnt-c367="" class="mat-expansion-panel ng-tns-c278-0 mat-expanded ng-star-inserted" ng-reflect-expanded="true">
<div role="region" class="mat-expansion-panel-content ng-tns-c278-0 ng-trigger ng-trigger-bodyExpansion" id="cdk-accordion-child-0" aria-labelledby="mat-expansion-panel-header-0" style="visibility: visible;">
<div class="mat-expansion-panel-body ng-tns-c278-0">
...
</div>
</div>
</mat-expansion-panel>
The first div (with the class mat-expansion-panel-content) has a lot of spacing that I want to remove. but before that I tried the css selector like the following
ion-menu mat-expansion-panel {
background-color: green; /* works */
}
ion-menu mat-expansion-panel .mat-expansion-panel-content {
background-color: red; /* doesn't work */
margin: 0;
}
I tried inspecting the div to check if some other style uses !important I found out that my css is not present at all.
Any clue why?