Components: mat-expansion-panel-body cannot override padding style

Created on 9 Nov 2018  路  2Comments  路  Source: angular/components

Bug, feature request, or proposal:

I'm doing recursive embedding of mat-expansion-panel.
I tried to reduce the padding-right of the mat-expansion-panel-body but the style
.mat-expansion-panel-body {
padding: 0 24px 16px;
}
is always used.

What is the expected behavior?

Respect my css

What is the current behavior?

my style is not used

What are the steps to reproduce?

Providing a StackBlitz reproduction is the best way to share your issue.

https://stackblitz.com/edit/angular-ojcyga-kmgpkr

All 2 comments

From looking at your stackblitz, it looks like your styles that you created did not apply because of view encapsulation. Since your component uses emulated encapsulation, the nghost special selectors are added to the styles, instead to style here you need to use a deep selector or turn off view encapsulation.

You can see in this fork of your stackblitz, it works as expected with view encapsulation turned off.

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dzrust picture dzrust  路  3Comments

constantinlucian picture constantinlucian  路  3Comments

alanpurple picture alanpurple  路  3Comments

julianobrasil picture julianobrasil  路  3Comments

LoganDupont picture LoganDupont  路  3Comments