In this demo I’m trying to style the mat-expansion-panel-header
‘s ::before
pseudo element like this (Style rules added to styles.scss):
mat-expansion-panel-header {
position: relative;
}
mat-expansion-panel-header::before {
content: '';
position: absolute;
top: 0px;
left: 0px;
bottom: 0px;
right: 0px;
z-index: 1000;
background-color: black;
}
So if the above rule would take effect the mat-expansion-panel-header
items in the demo would just be black.
However the rule does not take effect and when I look in the developer tools I don’t see the ::before
element.
Any ideas on how to fix this?