Skip to content

Commit

Permalink
Update files/en-us/web/css/hyphenate-limit-chars/index.md
Browse files Browse the repository at this point in the history
  • Loading branch information
wbamberg authored Feb 14, 2024
1 parent 993ca9d commit 8a9f836
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion files/en-us/web/css/hyphenate-limit-chars/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ In the first box, we don't set `hyphenate-limit-chars`, allowing the browser to

In the second box, we prevent the browser from hyphenating words unless they are at least 14 characters long by setting `hyphenate-limit-chars: 14`. As a result, "juxtaposition" is not hyphenated in the second box because it is only 13 characters long.

In the third box, we will make the browser include at least 9 characters before the hyphen. We do this by setting `hyphenate-limit-chars: 5 9 2`. The effect is that "acknowledgement" is now hyphenated as "acknowledge-ment" rather than "acknowl-edgement".
In the third box, we constrain the browser to include at least 9 characters before the hyphen by setting `hyphenate-limit-chars: 5 9 2`. The effect is that "acknowledgement" is now hyphenated as "acknowledge-ment" rather than the default version "acknowl-edgement", as shown in the first box.

Note that the browser does not have to include exactly 9 characters before the hyphen: as long as the constraints given in `hyphenate-limit-chars` are satisfied, the browser can break the word in the place it considers best. So in this case, for example, it chooses "acknowledge-ment" rather than the less readable "acknowled-gement".

In the fourth box, we make the browser include at least 7 characters after the hyphen by setting
`hyphenate-limit-chars: 5 2 7`. The effect is that "juxtaposition" is hyphenated as "juxta-position" rather than the default "juxtaposi-tion".
Expand Down

0 comments on commit 8a9f836

Please sign in to comment.