src/docs/text-decoration-thickness.mdx
import { ApiTable } from "@/components/api-table.tsx"; import { Example } from "@/components/example.tsx"; import { Figure } from "@/components/figure.tsx"; import { ResponsiveDesign, UsingACustomValue } from "@/components/content.tsx";
export const title = "text-decoration-thickness"; export const description = "Utilities for controlling the thickness of text decorations.";
<ApiTable rows={[ ["decoration-<number>", "text-decoration-thickness: <number>px;"], ["decoration-from-font", "text-decoration-thickness: from-font;"], ["decoration-auto", "text-decoration-thickness: auto;"], ["decoration-(length:<custom-property>)", "text-decoration-thickness: var(<custom-property>);"], ["decoration-[<value>]", "text-decoration-thickness: <value>;"], ]} />
Use decoration-<number> utilities like decoration-2 and decoration-4 to change the text decoration thickness of an element:
<!-- [!code classes:decoration-1] -->
<p class="underline decoration-1">The quick brown fox...</p>
<!-- [!code classes:decoration-2] -->
<p class="underline decoration-2">The quick brown fox...</p>
<!-- [!code classes:decoration-4] -->
<p class="underline decoration-4">The quick brown fox...</p>
<UsingACustomValue element="p" utility="decoration" name="text decoration thickness" value="0.25rem" variable="decoration-thickness" dataType="length" />
<ResponsiveDesign element="p" property="text-decoration-thickness" defaultClass="underline" featuredClass="decoration-4" />