I'm using "word-break: break-all" to insert breaks between any characters.
However, in Chrome, It's not working expectedly with specific characters (e.g colon, semicolon, comma) like below.
(My codepen is here: https://codepen.io/yukito/pen/wobZJq)
source code:
<style>
.test {
width: 300px;
word-break: break-all;
/* cosmetic */
background-color: red;
margin-bottom: 5px;
}
</style>
<div class="test">
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
</div>
<div class="test">
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
</div>
In FireFox and Safari, it's working expectedly.
My questions:
. Is it a bug ? or a spec?
. How do I break line between continuous semicolons in Chrome ?
Thank you.
Update:
"break-word" breaks line considering word boundaries like this pen: https://codepen.io/yukito/pen/xRNopJ
I really want to insert breaks between any characters without considering word boundaries.
For webkit browsers, you need to add:
Demo