I have always struggled with text elements not breaking when they exceed the boundaries of their parent element. I understand that setting a max-width of 100px will solve the issue, but it's not an ideal solution for me. I want the text to break only when it reaches the end of the block.
.card {
display: grid;
background-color: white;
border: 1px solid #e0e0e0;
border-radius: 0.5rem;
overflow: hidden;
}
.card-description {
padding: 1rem;
overflow-wrap: break-word;
}
Despite trying to set max-width to 100px, it did not work as expected. I am looking for a better solution where the text breaks only at the block level.