Table Layout

Set the table cell layout algorithm.

Widely available

This feature is well established and works across many devices and browser versions.

Chrome
Edge
Firefox
Safari

Usage

Auto

Allow the browser to determine column widths based on content.

Full NamePhone Number
John Doe+1 (555) 123-4567
<table class="w-full c-slate bw-1 bs-d bc-c tl-auto">
<thead>
<tr>
<th class="p-3 bg-silver-2 bc-slate bw-1 bs-d ta-c">Full Name</th>
<th class="p-3 bg-silver-2 bc-slate bw-1 bs-d ta-c">Phone Number</th>
</tr>
</thead>
<tbody>
<tr>
<td class="p-3 bc-slate bw-1 bs-d ta-c">John Doe</td>
<td class="p-3 bc-slate bw-1 bs-d ta-c">+1 (555) 123-4567</td>
</tr>
</tbody>
</table>

Fixed

Set column widths based on the table width and first row.

Full NamePhone Number
John Doe+1 (555) 123-4567
<table class="w-full c-slate bw-1 bs-d bc-c tl-f">
<thead>
<tr>
<th class="p-3 bg-silver-2 bc-slate bw-1 bs-d ta-c">Full Name</th>
<th class="p-3 bg-silver-2 bc-slate bw-1 bs-d ta-c">Phone Number</th>
</tr>
</thead>
<tbody>
<tr>
<td class="p-3 bc-slate bw-1 bs-d ta-c">John Doe</td>
<td class="p-3 bc-slate bw-1 bs-d ta-c">+1 (555) 123-4567</td>
</tr>
</tbody>
</table>

Responsiveness

Use breakpoint prefixes to target different screen sizes. Styles apply from the breakpoint & up.

Target viewport sizes with breakpoint prefixes.

sm:tl-*
Small640px
md:tl-*
Medium768px
lg:tl-*
Large1024px
xxl:tl-*
Extra Large1536px

Hover State

Apply styles conditionally on hover using the h: prefix.

Add the h: prefix to apply styles only when the user hovers over the element.

Syntax:h:tl-*