I'm building a button group using an alpinejs x-for loop, where the first and last buttons should have rounded-l-md and rounded-r-md using first:rounded-l-md
and last:rounded-r-md
. The last:rounded-r-md
works fine, however the first:rounded-l-md
doesn't work, because the <template>
used for the loop is seen as the first element, i presume.
I have added a jsfiddle: https://jsfiddle.net/20qega7d/