Rax
KPCKevin Powell - Community
•Created by Rax on 4/30/2024 in #front-end
How to truncate text with ellipsis in the middle based on container width?
Yeah the container for the
li
s have a max-width but I want the truncation of the ellipsis to be in the center of the string not where it overflows at the end of the content.
Just on the length of the string overflowing its container. The max-width of it's container is 310px
. But with window/screen size it can shrink down, but majority of the time it will be that 310px
.7 replies
KPCKevin Powell - Community
•Created by Rax on 4/30/2024 in #front-end
How to truncate text with ellipsis in the middle based on container width?
Hmm okay, still would use a Resize observer to react to the size change right? How bad of a performance hit would it be to have dozens of resize observers?
7 replies