Skip to content

Commit b67813e

Browse files
crisbetoandrewseguin
authored andcommitted
fix(card): flat card selector not working (#11028)
Fixes the `.mat-flat-card` selector not working due to its specificity being too low. Fixes #11014.
1 parent e7b5bd4 commit b67813e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/lib/card/card.scss

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,16 @@ $mat-card-header-size: 40px !default;
3232
}
3333
}
3434

35+
// Needs extra specificity to be able to override the elevation selectors.
36+
&.mat-card-flat {
37+
box-shadow: none;
38+
}
39+
3540
@include cdk-high-contrast {
3641
outline: solid 1px;
3742
}
3843
}
3944

40-
.mat-card-flat {
41-
box-shadow: none;
42-
}
43-
4445
// base styles for each card section preset (mat-card-content, etc)
4546
%mat-card-section-base {
4647
display: block;

0 commit comments

Comments
 (0)