I see that in the Safari browser the CSS word-break
property which I need is not being used. Why ?
Safari CSS word-break: keep-all; is not working
Asked Answered
I use Safari v5.1.7 (7534.57.2) –
Triumph
Why would you need it? The answer to this question is crucial for addressing your real problem, now that the “Why ?” question has been answered. What kind of CJK (or other?) text have you got, and can it be manipulated with a script, and what types of breaks should be inhibited? –
Particolored
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
if I use
break-all
it works in Safari, but it fails in e.g Firefox where it should be keep-all
. –
Triumph @Triumph Well, property isn't supported so we cannot really do anything here, and by the way, firefox does support
break-all
–
Nerynesbit I mean, I want to keep all words it they're too long, not break 'em –
Triumph
@Triumph so your are using CJK, try
white-space: nowrap;
but that will also affect non CJK text.. –
Nerynesbit in that case it looks the same as here (select nowrap option) w3schools.com/cssref/… the
normal
option changes nothing –
Triumph @Triumph
normal
will wrap the text where nowrap
won't –
Nerynesbit Answer should be updated since it's 3 years old and things have changed –
Vulcanism
I have found this to work:
selector{ -webkit-hyphens: none;}
As of Safari 9 including iOS, word-break: keep-all
is finally supported.
Bug Report 123782 - [CSS3] Add support for the word-break:keep-all CSS property
© 2022 - 2024 — McMap. All rights reserved.