As I work on designing a landing page using TailwindCSS, I’m looking to add a decorative element under my headlines. To accomplish this, I decided to create an SVG and utilize the after
pseudo-element to position it accordingly. Here’s a snippet of my code showcasing how I implemented this:
<span after:h-5 after:bg-[url('../public/svg/underline-large.svg')] after:bg-no-repeat />
The challenge I encountered with this approach is that I have to use different lengths of SVGs for varying headline sizes. Ideally, I would like to find a way to stretch one SVG to match the width of any given title. Any suggestions on how to achieve this?