Table Layout
Controls the table cell layout algorithm.
Utility | Properties |
---|---|
Error: 429 |
Auto
Initial value
This example sets the table layout to auto. The browser will determine the column widths based on the content.
Title | Opening Line |
---|---|
Letters to Anne | It's finally springtime here on earth! |
<table class="b-1 bc-c tc-indigo tl-auto w-full"> <thead> <tr> <th class="b-1 bc-indigo bg-indigo-2 p-3">Title</th> <th class="b-1 bc-indigo bg-indigo-2 p-3">Opening Line</th> </tr> </thead> <tbody> <tr> <td class="b-1 bc-indigo p-3">Letters to Anne</td> <td class="b-1 bc-indigo p-3">It's finally springtime here on earth!</td> </tr> </tbody></table>
Fixed
This example sets the table layout to fixed. The column widths are set by the width of the table and the first row.
Title | Opening Line |
---|---|
Letters to Anne | It's finally springtime here on earth! |
<table class="b-1 bc-c tc-indigo tl-f w-full"> <thead> <tr> <th class="b-1 bc-indigo bg-indigo-2 p-3">Title</th> <th class="b-1 bc-indigo bg-indigo-2 p-3">Opening Line</th> </tr> </thead> <tbody> <tr> <td class="b-1 bc-indigo p-3">Letters to Anne</td> <td class="b-1 bc-indigo p-3">It's finally springtime here on earth!</td> </tr> </tbody></table>
Conditional styles
Learn how to override existing utilities based on the userโs screen size or other factors, such as hover states.
Media modifier
You can combine responsive breakpoints like sm:-*
,md:-*
, lg:-*
, and xxl:-*
allows targeting specific utilities in different viewports.
<div class="tl-f md:tl-a ..."></div>
Hover modifier
Alternatively, you can apply :hover
by using h:-*
utility to override elements and change their values when hovering over them.
<div class="tl-f h:tl-a ..."></div>