Skip to content

Commit f365f9e

Browse files
committed
fix(material/grid-list): remove internal figure element
Removes the built-in `figure` element inside the grid tile since it isn't always desirable from an accessibility perspective. Fixes #21775.
1 parent 389e66a commit f365f9e

File tree

2 files changed

+14
-15
lines changed

2 files changed

+14
-15
lines changed

src/material/grid-list/grid-list.scss

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,6 @@ $text-padding: 16px;
1919
position: absolute;
2020
overflow: hidden;
2121

22-
.mat-figure {
23-
@include layout-common.fill;
24-
display: flex;
25-
26-
align-items: center;
27-
justify-content: center;
28-
height: 100%;
29-
30-
padding: 0;
31-
margin: 0;
32-
}
33-
3422
// Headers & footers
3523
.mat-grid-tile-header,
3624
.mat-grid-tile-footer {
@@ -79,3 +67,15 @@ $text-padding: 16px;
7967
}
8068
}
8169
}
70+
71+
.mat-grid-tile-content {
72+
@include mat-fill;
73+
display: flex;
74+
75+
align-items: center;
76+
justify-content: center;
77+
height: 100%;
78+
79+
padding: 0;
80+
margin: 0;
81+
}

src/material/grid-list/grid-tile.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<!-- TODO(kara): Revisit why this is a figure.-->
2-
<figure class="mat-figure">
1+
<div class="mat-grid-tile-content">
32
<ng-content></ng-content>
4-
</figure>
3+
</div>

0 commit comments

Comments
 (0)