# Details and accessibility Underlines, selection, form text and decorative text. ## Underlines From the font's own metrics: ```css a { text-underline-position: from-font; text-decoration-thickness: from-font; } ``` A dotted underline on an abbreviation: ```css abbr { text-decoration: underline dotted; } ``` Or tune manually: ```css a { text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--color-gray-1000); transition: text-decoration-color 200ms ease-out; } a:hover { text-decoration-color: var(--color-gray-1200); } ``` ## Selection - `::target-text` styles the phrase a shared link scrolls to. - The Custom Highlight API styles ranges you pick yourself, like search matches, without extra markup. ## Forms and editable text - `::placeholder` styles the hint in an empty field. - `caret-color` colors the blinking insertion bar. A fully custom caret is hard to build and rarely worth it. ### iOS input zoom **Size up on mobile.** The input renders at `16px` on small screens and drops to the design size from the `sm` breakpoint up. Nothing to compensate, but the mobile input no longer matches the desktop one. ```tsx ``` **Scale the text down.** Keep `font-size` at `16px` so Safari never zooms, then render at the intended size with a transform. Widen the element by the inverse of the scale so it still fills its container once shrunk. Divide `line-height` by the same factor so the intended leading survives. `origin-left` pins the text to the start edge, `origin-right` under RTL. Above the breakpoint, drop the transform and set the real size. ```tsx // 13px rendered from a 16px font-size: 13 / 16 = 0.8125