Tab Size
Controls the width of tab characters.
Widely available
This feature is well established and works across many devices and browser versions.
Chrome
Edge
Firefox
Safari
| Class | Style |
|---|---|
ts-0 | tab-size: 0; |
ts-2 | tab-size: 2; |
ts-4 | tab-size: 4; |
ts-8 | tab-size: 8; |
Tab Size 2
The tab size will be set to 2, which is a common indentation size for code.
This text is indented with a tab character.
<section class="bg-black"> <pre class="fs-md ts-2">This text is indented with a tab character.</pre></section>Tab Size 4
The tab size will be set to 4, providing more space between tab stops.
This text is indented with a tab character.
<section class="bg-black"> <pre class="fs-md ts-4">This text is indented with a tab character</pre></section>Tab Size 8
The default browser tab size is typically 8.
This text is indented with a tab character.
<section class="bg-black"> <pre class="fs-md ts-8">This text is indented with a tab character.</pre></section>Using utility variants
Learn how to override existing utilities based on the user's screen size or other factors, such as hover states.
Targeting different viewports
You can combine responsive breakpoints like sm:ts-*, md:ts-*, lg:ts-*, and xxl:ts-* to allow targeting specific utilities in different viewports.
Targeting hover states
Alternatively, you can apply :hover by using h:ts-* utility to override elements and change their values when hovering over them.