Safari CSS word-break: keep-all; is not working
14,065
Solution 1
Update :
Safari now supports keep-all
as a value. As of Safari 9.
word-break
property is partially supported in Safari, i.e it only supports word-break
if you use break-all
as a value and not keep-all
...
As you can see here (Read the note at very bottom) which says
Note: Partial support refers to supporting the "break-all" value, but not the "keep-all" value.
Bug Report 43917 - CSS3 'word-break: keep-all' is not supported
Solution 2
I have found this to work:
selector{ -webkit-hyphens: none;}
Related videos on Youtube
Comments
-
Tony over 1 year
I see that in the Safari browser the CSS
word-break
property which I need is not being used. Why ? -
Tony almost 10 yearsif I use
break-all
it works in Safari, but it fails in e.g Firefox where it should bekeep-all
. -
Mr. Alien almost 10 years@Tony Well, property isn't supported so we cannot really do anything here, and by the way, firefox does support
break-all
-
Tony almost 10 yearsI mean, I want to keep all words it they're too long, not break 'em
-
Mr. Alien almost 10 years@Tony so your are using CJK, try
white-space: nowrap;
but that will also affect non CJK text.. -
Tony almost 10 yearsin that case it looks the same as here (select nowrap option) w3schools.com/cssref/… the
normal
option changes nothing -
Mr. Alien almost 10 years@Tony
normal
will wrap the text wherenowrap
won't -
vsync almost 7 yearsAnswer should be updated since it's 3 years old and things have changed