Stumbled across a bit complicated requirement which requires a container with a triangular side on the right which expands depending on what's inside and it should have a rounded corners. This is what I've managed to do:
.b {
background-color:red;
border-radius: 10px;
clip-path: polygon(0% 0%, 85% 0%, 100% 50%, 85% 100%, 0% 100%);
padding: 20px;
}
.a {
width: 200px;
border: 1px solid black;
}
<div class="a">
<div class="b">
asd asd asd asdasd<br>
asd asd asd asdasd<br>
asd asd asd asdasd<br>
asd asd asd asdasd<br>
asd asd asd asdasd<br>
asd asd asd asdasd<br>
asd asd asd asdasd<br>
</div>
</div>
as you can compare with the desired output, it is almost same except for the rounded corners on the right.
