Working on my project that involves an angular frontend, I attempted to add a shadow effect to one of my components by using class="mat-elevation-z8"
. Strangely, this did not have the desired effect.
This is the HTML code in question:
<mat-card class="mat-elevation-z8" style="height: 400px; width: 400px;">
<mat-card-header>
<mat-card-title *ngIf="message">{{(message.title | truncateword: 25) | slice:0:30}}</mat-card-title>
<mat-card-subtitle *ngIf="message">{{message.publishedAt | date}}</mat-card-subtitle>
</mat-card-header>
<img *ngIf="image" [src]="image" alt="Here might be a preview image" mat-card-image>
<mat-card-content>
<p *ngIf="message">
{{(message.summary | truncateword:70 | slice:0:73)}}
</p>
</mat-card-content>
</mat-card>
In addition, I made sure to import ~@angular/material/theming
in my styles.css file. This brings me to my current conundrum. Here are the styles specified in my angular.json file:
"styles": [
"./node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css",
"src/styles.scss"
],
If anyone has any suggestions or insights regarding this issue, please feel free to share!