Skip to content

Commit 9416832

Browse files
andrewseguinmmalerba
authored andcommitted
fix(material-experimental/mdc-table): allow text to wrap (#23222)
(cherry picked from commit f1e57b8)
1 parent 9aaa4c6 commit 9416832

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/material-experimental/mdc-table/table.scss

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,16 @@
1313
@include vendor-prefixes.position-sticky($important: true);
1414
}
1515

16-
// MDC Table applies `table-layout: fixed`, but this is a backwards incompatible
17-
// change since the table did not previously apply it.
18-
// TODO: Add a mixin to MDC to set the layout instead of including this override,
19-
// see this issue: https://github.com/material-components/material-components-web/issues/6412
2016
.mat-mdc-table {
17+
// MDC Table applies `table-layout: fixed`, but this is a backwards incompatible
18+
// change since the table did not previously apply it.
19+
// TODO: Add a mixin to MDC to set the layout instead of including this override,
20+
// see this issue: https://github.com/material-components/material-components-web/issues/6412
2121
table-layout: auto;
22+
23+
// The MDC table does not allow text to wrap within the cell. This allows for text to
24+
// wrap when the cell reaches its maximum width.
25+
white-space: normal;
2226
}
2327

2428
// MDC table rows are styled with a top border, whereas our legacy flex table styles rows with

0 commit comments

Comments
 (0)