Skip to content

Commit

Permalink
fix(material/grid-list): remove internal figure element (#21826)
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 authored Mar 9, 2021
1 parent e6578d9 commit b4fafda
Show file tree
Hide file tree
Showing 2 changed files with 15 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 layout-common.fill;
display: flex;

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

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

0 comments on commit b4fafda

Please sign in to comment.