Glad that worked out for you!
I didn’t mention this in my initial reply since you were spacing the items out from one another with margin, but you can add spaces as needed in the content
value and prevent them from “collapsing” by changing the Breaking
style property in the Designer:
If you’d like to do this within the same custom CSS you can do that instead with the (full) code shown below:
<style>
.collection-item-7 {
white-space: pre;
}
.collection-item-7::after {
content: ', ' ;
display: inline-block;
}
.collection-item-7:nth-last-child(2)::after {
content: ' and ';
}
.collection-item-7:last-child::after {
content: '';
}
</style>
Just keep in mind that you’ll also probably want to clear any spacing you have set on the Collection Item 7
element as the spaces within the pseudo elements will handle that for you