Class | Properties |
---|---|
.table-auto | table-layout: auto; |
.table-fixed | table-layout: fixed; |
Usage
Use .table-auto
to allow the table to automatically size columns to fit the contents of the cell.
Use .table-fixed
to allow the table to ignore the content and use fixed widths for columns.
The width of the first row will set the column widths for the whole table.
You can manually set the widths for some columns and the rest of the available width will be divided evenly amongst the columns without explicit width.
Variants
By default, no responsive or hover-state variants are generated for table layout utilities.
Responsive
To include responsive variants like .md:table-fixed
, add "table-layout"
to the $responsive-variants
variable in your theme’s _variables.scss
file when recompiling your CSS:
$responsive-variants: (
// ...
"table-layout",
);
Hover-state
To include hover-state variants like .hover:table-fixed
, add "table-layout"
to the $hover-variants
variable:
$hover-variants: (
// ...
"table-layout",
);