Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
FormularSumo authored Jan 2, 2024
2 parents a58acaa + 6660230 commit dc02dc1
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
2 changes: 1 addition & 1 deletion files/en-us/web/api/window/launchqueue/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if ("launchQueue" in window) {
const track = params.get("track");
if (track) {
audio.src = track;
title.textContent = new URL(track).pathname.substr(1);
title.textContent = new URL(track).pathname.substring(1);
audio.play();
}
}
Expand Down
29 changes: 28 additions & 1 deletion files/en-us/web/css/word-break/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ The **`word-break`** [CSS](/en-US/docs/Web/CSS) property sets whether line break
word-break: normal;
word-break: break-all;
word-break: keep-all;
word-break: auto-phrase; /* experimental */
word-break: break-word; /* deprecated */

/* Global values */
Expand All @@ -38,11 +39,15 @@ The `word-break` property is specified as a single keyword chosen from the list
- : To prevent overflow, word breaks should be inserted between any two characters (excluding Chinese/Japanese/Korean text).
- `keep-all`
- : Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as for `normal`.
- `auto-phrase` {{Experimental_Inline}}
- : Has the same effect as `word-break: normal` except that language-specific analysis is performed to improve word breaks by not placing them in the middle of natural phrases.
- `break-word` {{Deprecated_Inline}}
- : Has the same effect as `overflow-wrap: anywhere` combined with `word-break: normal`, regardless of the actual value of the {{cssxref("overflow-wrap")}} property.

> **Note:** In contrast to `word-break: break-word` and `overflow-wrap: break-word` (see {{cssxref("overflow-wrap")}}), `word-break: break-all` will create a break at the exact place where text would otherwise overflow its container (even if putting an entire word on its own line would negate the need for a break).

The specification also lists an additional value, `manual`, which is not currently supported in any browsers. When implemented, `manual` will have the same effect as `word-break: normal` except that breaks won't be automatically inserted in Southeast Asian languages. This is needed because, in such languages, user agents frequently place breaks in suboptimal positions. `manual` will allow you to insert line breaks in optimal positions manually.

## Formal definition

{{CSSInfo}}
Expand Down Expand Up @@ -77,7 +82,21 @@ The `word-break` property is specified as a single keyword chosen from the list
グレートブリテンおよび北アイルランド連合王国という言葉は本当に長い言葉
</p>

<p>4. <code>word-break: break-word</code></p>
<p>4. <code>word-break: manual</code></p>
<p class="manual narrow">
This is a long and Honorificabilitudinitatibus califragilisticexpialidocious
Taumatawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu
グレートブリテンおよび北アイルランド連合王国という言葉は本当に長い言葉
</p>

<p>5. <code>word-break: auto-phrase</code></p>
<p class="autoPhrase narrow">
This is a long and Honorificabilitudinitatibus califragilisticexpialidocious
Taumatawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu
グレートブリテンおよび北アイルランド連合王国という言葉は本当に長い言葉
</p>

<p>6. <code>word-break: break-word</code></p>
<p class="breakWord narrow">
This is a long and Honorificabilitudinitatibus califragilisticexpialidocious
Taumatawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu
Expand Down Expand Up @@ -110,6 +129,14 @@ The `word-break` property is specified as a single keyword chosen from the list
word-break: keep-all;
}

.manual {
word-break: manual;
}

.autoPhrase {
word-break: auto-phrase;
}

.breakWord {
word-break: break-word;
}
Expand Down

0 comments on commit dc02dc1

Please sign in to comment.