Skip to content

Outline Offset

Controls the offset of an element's outline.

Utility Properties
Error: 429

This example showcases various outline-offset values:

  • The 1px outline offset utility places the outline 1 pixel away from the border of the element.
  • The 2px outline offset utility places the outline 2 pixels away from the border of the element.
  • The 3px outline offset utility places the outline 3 pixels away from the border of the element.
<div class="d-g g-16 gtc-1 sm:gtc-3">
<div class="b-1 bc-indigo d-16 oc-indigo oo-1 os-s rad-1"></div>
<div class="b-1 bc-indigo d-16 oc-indigo oo-2 os-s rad-1"></div>
<div class="b-1 bc-indigo d-16 oc-indigo oo-3 os-s rad-1"></div>
</div>

Conditional styles

Learn how to override existing utilities based on the userโ€™s screen size or other factors, such as hover states.

Media modifier

You can combine responsive breakpoints like sm:-*,md:-*, lg:-*, and xxl:-* allows targeting specific utilities in different viewports.

<div class="oo-1 md:oo-2 ..."></div>

Hover modifier

Alternatively, you can apply :hover by using h:-* utility to override elements and change their values when hovering over them.

<div class="oo-1 h:oo-2 ..."></div>