Skip to content
Support Yumma CSS by starring us on GitHub!

Table Layout

Controls the table cell layout algorithm.

Class Properties

tl-auto

table-layout: auto;

tl-f

table-layout: fixed;

Auto

This example sets the table layout to auto. The browser will determine the column widths based on the content.

<div class="w-64">
<table class="b-1 bc-c bc-l-silver-3 tl-auto w-full">
<thead>
<tr>
<th class="b-1 bc-l-silver-3 p-3">Column A</th>
<th class="b-1 bc-l-silver-3 p-3">Column B</th>
</tr>
</thead>
<tbody>
<tr>
<td class="b-1 bc-l-silver-3 p-3">Short</td>
<td class="b-1 bc-l-silver-3 p-3">This is a much longer piece of content</td>
</tr>
</tbody>
</table>
</div>

Fixed

This example sets the table layout to fixed. The column widths are set by the width of the table and the first row.

<div class="w-64">
<table class="b-1 bc-c bc-l-silver-3 tl-f w-full">
<thead>
<tr>
<th class="b-1 bc-l-silver-3 p-3">Column A</th>
<th class="b-1 bc-l-silver-3 p-3">Column B</th>
</tr>
</thead>
<tbody>
<tr>
<td class="b-1 bc-l-silver-3 p-3">Short</td>
<td class="b-1 bc-l-silver-3 p-3">This is a much longer piece of content</td>
</tr>
</tbody>
</table>
</div>

Utilizing utilities conditionally

Override existing utilities based on the user's screen size or other factors, such as hover states. Learn more about modifiers in our documentation.

Responsive breakpoints

You can combine responsive breakpoints like sm:tl-*,md:tl-*, lg:tl-*, and xxl:tl-* allows targeting specific utilities in different viewports.

<div class="tl-f md:tl-a ..."></div>

Utilizing utilities conditionally

Override existing utilities based on the user's screen size or other factors, such as hover states. Learn more about modifiers in our documentation.

Hover states

Alternatively, you can apply :hover by using h:tl-* utility to override elements and change their values when hovering over them.

<div class="tl-f h:tl-a ..."></div>