Skip to content

Commit

Permalink
Merge pull request #490 from HubSpot/add-comment-word-break
Browse files Browse the repository at this point in the history
Adding a comment to explain purpose of overflow wrap in typography.css
  • Loading branch information
jasonnrosa authored Aug 10, 2023
2 parents 01e373d + eae621a commit aee54a7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/css/elements/_typography.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
/* The overflow-wrap is meant to prevent long/large words from breaking the mobile responsiveness of a page (e.g. horizontal scrolling). It is preferred to reduce font sizes on mobile to address this, with this CSS specifically helping with extreme scenarios where a reduction in font size is not possible. */

body {
line-height: 1.4;
overflow-wrap: break-word;
}

/* Handles word breaking for a few specific languages which handle breaks in words differently. If your content is not translated into these languages, you can safely remove this. */

html[lang^="ja"] body,
html[lang^="zh"] body,
html[lang^="ko"] body {
Expand Down

0 comments on commit aee54a7

Please sign in to comment.