0

I want to transfom: translateY(200%) if it has 2 childs, and translateY(300%) if it has 3 childs. How can i do this?

Wojciech Bałucki
  • 653
  • 1
  • 4
  • 5

1 Answers1

0

Ok i found the solution,

 .product-status:nth-last-child(n + 3),
      .product-status:nth-last-child(n + 3)~* {
        transform: translateY(300%)!important;
    }
    .product-status:nth-last-child(n + 2),
      .product-status:nth-last-child(n + 2)~* {
        transform: translateY(150%);
    }

That solves the problem

Wojciech Bałucki
  • 653
  • 1
  • 4
  • 5