word-break: break-all sometimes fail on really long text (~10000 characters), why and how to fix it?

I simple have a span element, with random letters (a~z) on it, around 100000, no spaces. I used word-break: break-all, and it worked as intended, the text would not overflow. But... There are random points in the doc where some letters do overflow outside. On this amount of text, it usually happens 3 or 4 times in the whole doc on random points. The screenshot shows that all text is perfectly aligned (cause it is a monospaced font) except on these random areas where a couple slip outside... Is that just the browser failing on the huge amount of characters? Or something else? If so, is it fixable?
No description
7 Replies
MarkBoots
MarkBoots•9mo ago
trying to replicate it, but doesnt happen to me. can you replicate it in a codepen? https://codepen.io/MarkBoots/pen/LYqpeja
MarkBoots
MarkBoots•9mo ago
o wait, it did yea, must be some hick up from the browser
No description
Joao
Joao•9mo ago
I just went up to 100_000 words and no issues. The only inconsistency is when I comment out monospace font
MarkBoots
MarkBoots•9mo ago
lots of calc and painting. could be a capacity thing
Joao
Joao•9mo ago
1mill also nothing, but withou specifying max-width or margin its hard to tell because the text overflows a bit under the scrollbar. But there's no horizontal scroll either, so... Still, I'm curious what's the use case for this please! 😄
MarkBoots
MarkBoots•9mo ago
yea, like to know it too if it is just random, just hide the overflow i guess