CSS Snippet – Consistently Hyphenate across browsers

Hyphenate consistently across browsers: (via https://justmarkup.com/log/2015/07/31/dealing-with-long-words-in-css)

.hyphenate {
  overflow-wrap: break-word;
  word-wrap: break-word;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  -moz-hyphens: auto;
  hyphens: auto;
}

Leave a Reply