Browser: Chrome 110 OS: Windows URL: Link to a page that illustrates this issue Video: Short screen recording that illustrates this issue (free tool: jam.dev)
Hello,
As you can see in the screenshot below, there is an anonymous div within the checkout order summary that prevents a selector like :not(:last-child) from working as expected on the cart loop.
Thanks for reporting this! That div isn’t anonymous: its .brx-query-trail class identifies it as Bricks’ query-loop marker. It temporarily stores query settings used by frontend JavaScript for features such as Load more and infinite scroll.
Bricks normally removes it after reading those settings. We’ve reproduced an issue where it remains after a checkout update and added it to our internal bug tracker. We’ll update this thread once it’s fixed.
As a workaround, add a class such as cart-item to the looped Div and use this selector for your styles:
.cart-item:has(~ .cart-item)
This selects every cart item that has another cart item after it—giving you “all except the last cart item” regardless of the query trail or other elements following the loop.