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;}
Share:
14,065

Related videos on Youtube

Tony
Author by

Tony

http://IntenseSolutions.pl

Updated on June 04, 2022

Comments

  • Tony
    Tony over 1 year

    I see that in the Safari browser the CSS word-break property which I need is not being used. Why ?

    enter image description here

  • Tony
    Tony almost 10 years
    if I use break-all it works in Safari, but it fails in e.g Firefox where it should be keep-all.
  • Mr. Alien
    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
    Tony almost 10 years
    I mean, I want to keep all words it they're too long, not break 'em
  • Mr. Alien
    Mr. Alien almost 10 years
    @Tony so your are using CJK, try white-space: nowrap; but that will also affect non CJK text..
  • Tony
    Tony almost 10 years
    in that case it looks the same as here (select nowrap option) w3schools.com/cssref/… the normal option changes nothing
  • Mr. Alien
    Mr. Alien almost 10 years
    @Tony normal will wrap the text where nowrap won't
  • vsync
    vsync almost 7 years
    Answer should be updated since it's 3 years old and things have changed