Firefox word-break breaks short words at random points

前端 未结 4 967
耶瑟儿~
耶瑟儿~ 2020-12-11 03:57

I\'m break-wording a container so that extremely long words won\'t overflow. While Chrome and Safari deal with this really well, it seems that Firefox and IE li

4条回答
  •  时光说笑
    2020-12-11 04:09

    I did a temporary fix by changing my break-word code to:

    .break-word {
    word-break: break-word;
    word-wrap: break-word;
    }
    

    The words are no longer breaking weirdly. I'm just not sure how safe this is in terms of cross-browser support (as I've only tested with the latest versions of Chrome, Firefox, and Safari)

    Apparently hyphenation is only supported with en-US explicitly declared. If anybody has a more valid answer/explanation, I will gladly accept your answer.

提交回复
热议问题