0

I dont want to style border for the last item inside container. how to do this? I tried

::ng-deep custom-comp .custom-container: last-child {
       border-bottom: none; //this is not working
}

<div class="container">
    <custom-comp></custom-comp>
    <custom-comp></custom-comp>
</div>

custom comp:
<div class="custom-container" style="border-bottom: solid 1px red;">

</div>

Can anyone help me how to style so the last custom-comp doesn't have the border bottom?

thanks

Mukil Deepthi
  • 6,072
  • 13
  • 71
  • 156

1 Answers1

0

I tried following and it worked.

div.container {
::ng-deep custom-comp:last-child > div {
  border-bottom: none;
}
}
Mukil Deepthi
  • 6,072
  • 13
  • 71
  • 156