Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

enter image description here

like image 703
Tony Avatar asked Dec 20 '13 12:12

Tony


People also ask

Why word-break is not working in CSS?

Word-Break has nothing to do with inline-block . Make sure you specify width and notice if there are any overriding attributes in parent nodes. Make sure there is not white-space: nowrap .

Can I use word-Break Break-all?

The “word-break: break-all;” will break the word at any character so the result is to difficulty in reading whereas “word-wrap: break-word;” will split word without making the word not break in the middle and wrap it into next line.

Is word-break deprecated?

Note: While word-break: break-word is deprecated, it has the same effect, when specified, as word-break: normal and overflow-wrap: anywhere — regardless of the actual value of the overflow-wrap property.

How do you keep words from breaking in CSS?

use white-space: nowrap; . If you have set width on the element on which you are setting this it should work. It's white-space: nowrap actually.


2 Answers

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

like image 164
Mr. Alien Avatar answered Oct 09 '22 21:10

Mr. Alien


I have found this to work:

selector{ -webkit-hyphens: none;}
like image 22
Shay Stibelman Avatar answered Oct 09 '22 20:10

Shay Stibelman