Expand description
Focus ring wrapper with a true offset gap.
GPUI has no ring/ring-offset utility. To reproduce Tailwind’s
ring-2 ring-offset-2 look (a ring separated from the element by a gap),
we WRAP the focusable content in an outer bordered container with inner
padding. The wrapper keeps its size in both states (transparent border when
unfocused) so focus does not shift layout.
Functions§
- focus_
ring - Wraps
contentin a gapped focus ring ofcolor, shown only whenfocused. Layout is stable across focus states. - focus_
ring_ error - Focus ring in the danger color, for invalid/error fields.
- focus_
ring_ primary - Focus ring in the primary accent color (default for inputs/buttons).