Replacing every other coloring with nth-child selector

This commit is contained in:
Michaela Brydon 2024-04-03 15:51:17 -04:00
parent a45096a5ea
commit 628a07b30d

View file

@ -78,8 +78,7 @@
<div
v-for="(item, i) in nonServicePackageCartItems"
:key="i"
class="px-5 py-1 non-packaged-cart-item"
:class="i % 2 == 0 ? 'even' : ''">
class="px-5 py-1 non-packaged-cart-item">
<div class="d-flex justify-content-between align-items-center">
<span
v-if="item.isRecycle"
@ -489,10 +488,8 @@ export default {
text-underline-offset: auto !important;
}
.non-packaged-cart-item {
&.even {
background-color: $gray-100;
}
.non-packaged-cart-item:nth-child(odd){
background-color: $gray-100;
}
.cart-item {