I'm using the hyphens
property of CSS: https://developer.mozilla.org/en-US/docs/Web/CSS/hyphens Mozillas documentation says:
Suggested line break opportunities, as covered in Suggesting line break opportunities, should be preferred over automatically selecting break points whenever possible.
I thought that means the browser places hyphens as needed unless there is something like a ­
. If that's the case the ­
will be prioritised.
But I have this code:
.box {
width: 130px;
border: 1px solid red;
margin-bottom: 5px;
}
.box > a {
text-transform: uppercase;
font-size: 12px;
-moz-hyphens: auto;
-webkit-hyphens: auto;
-ms-hyphens: auto;
hyphens: auto;
}
<div class="box">
<a href="" lang="en">subdermat­oglyphic</a>
</div>
<div class="box">
<a href="" lang="en">subdermatoglyphic</a>
</div>
Now I would assume the word breaks after "subdermat". But it doesn't. It breaks after "subdermato". At least in Firefox 33. This result may be different in other browsers. I know that this is "experimental technology" but maybe I'm missing something. Is something wrong with my implementation?