Skip to content

Commit

Permalink
fix(material/grid-list): remove internal figure element
Browse files Browse the repository at this point in the history
Removes the built-in `figure` element inside the grid tile since it isn't always desirable from
an accessibility perspective.

Fixes #21775.
  • Loading branch information
crisbeto committed Mar 3, 2021
1 parent 389e66a commit f365f9e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
24 changes: 12 additions & 12 deletions src/material/grid-list/grid-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,6 @@ $text-padding: 16px;
position: absolute;
overflow: hidden;

.mat-figure {
@include layout-common.fill;
display: flex;

align-items: center;
justify-content: center;
height: 100%;

padding: 0;
margin: 0;
}

// Headers & footers
.mat-grid-tile-header,
.mat-grid-tile-footer {
Expand Down Expand Up @@ -79,3 +67,15 @@ $text-padding: 16px;
}
}
}

.mat-grid-tile-content {
@include mat-fill;
display: flex;

align-items: center;
justify-content: center;
height: 100%;

padding: 0;
margin: 0;
}
5 changes: 2 additions & 3 deletions src/material/grid-list/grid-tile.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<!-- TODO(kara): Revisit why this is a figure.-->
<figure class="mat-figure">
<div class="mat-grid-tile-content">
<ng-content></ng-content>
</figure>
</div>

0 comments on commit f365f9e

Please sign in to comment.