Dev Helpers
← Back

Set an SVG stroke from the text colour

Set an SVG stroke from the text colour with Tailwind CSS 4 utilities. The preview uses precompiled styles.

Open this example in the interactive library

Source code

<div
  class="demo text-violet-700 [&_svg]:fill-none [&_svg]:stroke-current [&_svg]:stroke-4"
>
  <svg aria-hidden="true" width="64" height="42">
    <circle cx="20" cy="20" r="16" />
  </svg>
  SVG outline follows text
</div>