Border Collapse

Set the collapsing behavior for table borders.

Widely available

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

Chrome
Edge
Firefox
Safari

Usage

Separate

Table cell borders remain distinct, allowing for spacing.

AB
CD
<table class="w-full bc-gray c-gray bw-1 bc-s ta-c">
<tbody>
<tr>
<td class="p-2 bc-gray bw-1">A</td>
<td class="p-2 bc-gray bw-1">B</td>
</tr>
<tr>
<td class="p-2 bc-gray bw-1">C</td>
<td class="p-2 bc-gray bw-1">D</td>
</tr>
</tbody>
</table>

Collapse

Table borders merge.

AB
CD
<table class="w-full bc-gray c-gray bw-1 bc-c ta-c">
<tbody>
<tr>
<td class="p-2 bc-gray bw-1">A</td>
<td class="p-2 bc-gray bw-1">B</td>
</tr>
<tr>
<td class="p-2 bc-gray bw-1">C</td>
<td class="p-2 bc-gray bw-1">D</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:bs-*
Small640px
md:bs-*
Medium768px
lg:bs-*
Large1024px
xxl:bs-*
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:bs-*