I need to select the last-child element who class begins with a specific value. Let's suppose I have the next html structure elements:
<div class="wrapper">
<div class="test-1">this is test-1</div>
<div class="test-2">this is test-2</div>
<div class="test-3">this is test-3</div>
<div class="test-4">this is test-4</div>
<div class="another-test">this is the another test</div>
</div>
So, I want to select the div with class="test-4". I'm using the next SCSS code but it doesn't work.
div.wrapper div[class^="test"]:last-child {
background-color: red;
}