You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, resuming, the template is the first child and the first .btn element of the .btn-group is not rounded.
A possible solution could be the replacement of :first-child with :first-of-type and :last-child with :last-of-type (here you can find my implementation on CodePen which compares with the current one).
The text was updated successfully, but these errors were encountered:
Unfortunately using -of-type instead of -child selectors create another issue:
Currently, if you have buttons of different types (a vs button for example), the button styling breaks because the selectors depend on the button type
So this would be a trade-off if we use -child selectors. I think it makes more sense to apply styles to child elements instead of the type of element because the button can be any element. If you're using libraries like alpine that force you to put use <template> elements, it makes more sense to just add all your children to the loop.
I'm sorry if this is inconvenient but I can't find a better way.
inorganik
pushed a commit
to inorganik/daisyui
that referenced
this issue
Feb 7, 2023
When working in combination with Alpine.js, the most common approach to pagination is using
x-for
and the usual syntax is the following:Supposing there are 3 pages and we are on the second page, the resulting HTML will look like this:
So, resuming, the
template
is the first child and the first.btn
element of the.btn-group
is not rounded.A possible solution could be the replacement of
:first-child
with:first-of-type
and:last-child
with:last-of-type
(here you can find my implementation on CodePen which compares with the current one).The text was updated successfully, but these errors were encountered: