You can do that either by using clip-path directly on that specific element or adding a :before or :after or a child element as a decoration element to deal with the right corner.
<div class="dialog">
Some text here to tell you the truth about life.
</div>
<div class="dialog dialog--outline">
Some other text to show you life when it has borders.
</div>
5
Answers
You can do that either by using clip-path directly on that specific element or adding a :before or :after or a child element as a decoration element to deal with the right corner.
Here is an idea using pseudo-elements. I considered CSS variables so you can easily adjust the shape without touching the code.
Play with CSS raduises &
box-shadow
and see what happens! ; )Example using CSS clip-path.
It mimics a border by adding the same clip-path to a slightly larger wrapping element.
Inspiration: How to add border in my clip-path: polygon(); CSS style
Good explanation on SVG paths: SVG rounded corner
Check the live code on pen