Safari CSS word-break: keep-all; is not working
Asked Answered
T

3

5

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

enter image description here

Triumph answered 20/12, 2013 at 12:2 Comment(2)
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
N
7

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

Nerynesbit answered 20/12, 2013 at 12:5 Comment(7)
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-allNerynesbit
I mean, I want to keep all words it they're too long, not break 'emTriumph
@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 nothingTriumph
@Triumph normal will wrap the text where nowrap won'tNerynesbit
Answer should be updated since it's 3 years old and things have changedVulcanism
O
5

I have found this to work:

selector{ -webkit-hyphens: none;}
Obsequies answered 19/3, 2014 at 11:18 Comment(0)
P
0

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

Phlogopite answered 22/12, 2015 at 10:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.