File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -918,6 +918,13 @@ table {
918918.table--hoverCell tbody td : hover {
919919 background-color : # f5f5f5 ; }
920920
921+ .table--truncate {
922+ table-layout : fixed; }
923+ .table--truncate td {
924+ overflow : hidden;
925+ text-overflow : ellipsis;
926+ white-space : nowrap; }
927+
921928i ,
922929em ,
923930.italic {
Original file line number Diff line number Diff line change @@ -156,3 +156,14 @@ table {
156156.table--hoverCell {
157157 tbody td :hover { background-color : getColor (background , light ); }
158158}
159+
160+ // Truncate table
161+ .table--truncate {
162+ table-layout : fixed ;
163+
164+ td {
165+ overflow : hidden ;
166+ text-overflow : ellipsis ;
167+ white-space : nowrap ;
168+ }
169+ }
Original file line number Diff line number Diff line change 1919 text-align : center;
2020 width : 100% ;
2121 }
22+
23+ .table--truncate ,
24+ .table--truncate td {
25+ width : 500px ;
26+ }
2227 </ style >
2328</ head >
2429
@@ -345,6 +350,38 @@ <h6>Heading 6 <small>Helper text</small></h6>
345350 </ tbody >
346351 </ table >
347352
353+ < table class ="table--truncate ">
354+ < thead >
355+ < tr >
356+ < th scope ="col "> #</ th >
357+ < th scope ="col "> First Name</ th >
358+ < th scope ="col "> Last Name</ th >
359+ </ tr >
360+ </ thead >
361+
362+ < tfoot >
363+ < tr >
364+ < td > < strong > Total Users:</ strong > </ td >
365+ < td > 2</ td >
366+ < td > </ td >
367+ </ tr >
368+ </ tfoot >
369+
370+ < tbody >
371+ < tr >
372+ < td > 1</ td >
373+ < td title ="This is a long long long long long long long long text "> This is a long long long long long long long long text</ td >
374+ < td > Doe</ td >
375+ </ tr >
376+
377+ < tr >
378+ < td > 2</ td >
379+ < td > Jane</ td >
380+ < td > Doe</ td >
381+ </ tr >
382+ </ tbody >
383+ </ table >
384+
348385 < div class ="table--responsive ">
349386 < table class ="table--full ">
350387 < thead >
You can’t perform that action at this time.
0 commit comments