Typography
Utilities for controlling the size of tab characters.
| Class | Styles |
|---|---|
tab-<number> | tab-size: <number>; |
tab-(<custom-property>) | tab-size: var(<custom-property>); |
tab-[<value>] | tab-size: <value>; |
Use tab-<number> utilities like tab-2 and tab-8 to control the size of tab characters:
function indent() { return 'tabbed';}function indent() { return 'tabbed';}<pre class="tab-2 ...">function indent() { 	return 'tabbed' }</pre><pre class="tab-8 ...">function indent() { 	return 'tabbed' }</pre>Use the tab-[<value>] syntax to set the tab size based on a completely custom value:
<pre class="tab-[12px] ..."> <!-- ... --></pre>For CSS variables, you can also use the tab-(<custom-property>) syntax:
<pre class="tab-(--my-tab-size) ..."> <!-- ... --></pre>This is just a shorthand for tab-[var(<custom-property>)] that adds the var() function for you automatically.
Prefix a tab-size utility with a breakpoint variant like md: to only apply the utility at medium screen sizes and above:
<pre class="tab-4 md:tab-8 ..."> <!-- ... --></pre>Learn more about using variants in the variants documentation.
Use the --tab-size-* theme variables to customize the tab size utilities in your project:
@theme { --tab-size-github: 8; }Now the tab-github utility can be used in your markup:
<pre class="tab-github"> <!-- ... --></pre>Learn more about customizing your theme in the theme documentation.