I have applied the following style:
div>span {
display: flex;
flex: 1 0 0;
align-self: center;
align-items: center;
justify-content: flex-end;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
Interestingly, the styling for ellipsis only seems to work with hidden and nowrap, but not with ellipsis. After researching, I found that it has something to do with the available width calculation, which is not clear to me how it can be helpful.
Evidently, the width of the content exceeds the container (hence being cut off). The closest working solution I found is by setting the display property to block instead of flex. However, I prefer using flex as it resolves many other issues.
I am struggling to find a way to maintain the flexibility offered by flex while making sure the text is ellipsized correctly. Is there a way to adjust this example to achieve this?