Tailwindcss: Feature request: Rounded underlines

Created on 20 Jun 2020  路  3Comments  路  Source: tailwindlabs/tailwindcss

I propose a feature request to allow for rounded underlines. Currently there is no way to do this with tailwind, but I think it's something a lot of people would find handy. Example:
https://jsfiddle.net/toqL0agq/1/

image

I don't mind implementing this if it's something that would be seen as beneficial to Tailwind.

Thoughts?

Most helpful comment

I've tweaked your example to show what this would look like using Tailwind classes. Basically it involves styling an empty div to make it look like the underline. Here's a link to the forked jsfiddle https://jsfiddle.net/tcjL2w6o/1/ and here is the code.

<div class="w-2/3 mx-auto">
  <h2 class="text-xl font-semibold pb-1">Title</h2>
  <div class="h-2 bg-green-500 rounded-md"></div>
  <p class="pt-4 pb-10">Text</p>
  <h2 class="text-xl font-semibold pb-1">Long title this is a very long title, spanning multiple lines.</h2>
  <div class="h-2 bg-green-500 rounded-md"></div>
</div>

All 3 comments

I've tweaked your example to show what this would look like using Tailwind classes. Basically it involves styling an empty div to make it look like the underline. Here's a link to the forked jsfiddle https://jsfiddle.net/tcjL2w6o/1/ and here is the code.

<div class="w-2/3 mx-auto">
  <h2 class="text-xl font-semibold pb-1">Title</h2>
  <div class="h-2 bg-green-500 rounded-md"></div>
  <p class="pt-4 pb-10">Text</p>
  <h2 class="text-xl font-semibold pb-1">Long title this is a very long title, spanning multiple lines.</h2>
  <div class="h-2 bg-green-500 rounded-md"></div>
</div>

Tailwind to the rescue! Nice solution thanks @robbyrice

Glad to help!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rgaufman picture rgaufman  路  3Comments

ghost picture ghost  路  3Comments

jbardnz picture jbardnz  路  3Comments

benface picture benface  路  3Comments

paulhuisman picture paulhuisman  路  3Comments