From 244bbbf4b731ddf1a2e320af842d21c2ea6d4ae9 Mon Sep 17 00:00:00 2001 From: Andrew Seguin Date: Thu, 22 Jul 2021 13:32:41 -0600 Subject: [PATCH] fix(material-experimental/mdc-table): allow text to wrap --- src/material-experimental/mdc-table/table.scss | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/material-experimental/mdc-table/table.scss b/src/material-experimental/mdc-table/table.scss index d7c8068cfa4b..983735df613f 100644 --- a/src/material-experimental/mdc-table/table.scss +++ b/src/material-experimental/mdc-table/table.scss @@ -13,12 +13,16 @@ @include vendor-prefixes.position-sticky($important: true); } -// MDC Table applies `table-layout: fixed`, but this is a backwards incompatible -// change since the table did not previously apply it. -// TODO: Add a mixin to MDC to set the layout instead of including this override, -// see this issue: https://github.com/material-components/material-components-web/issues/6412 .mat-mdc-table { + // MDC Table applies `table-layout: fixed`, but this is a backwards incompatible + // change since the table did not previously apply it. + // TODO: Add a mixin to MDC to set the layout instead of including this override, + // see this issue: https://github.com/material-components/material-components-web/issues/6412 table-layout: auto; + + // The MDC table does not allow text to wrap within the cell. This allows for text to + // wrap when the cell reaches its maximum width. + white-space: normal; } // MDC table rows are styled with a top border, whereas our legacy flex table styles rows with