Never break inline code spans (nowrap)

word-break: keep-all does not suppress breaks at hard hyphens (an
explicit UAX #14 break opportunity), so `--arg` could split after the
dashes. Inline code is short — nowrap is the safe fix.
This commit is contained in:
2026-08-30 02:20:54 +00:00
parent 2b9c7635d3
commit 85a306296f
+5 -1
View File
@@ -1174,7 +1174,11 @@ code {
inherited value), shifting it 30% toward --muted. */
code:not(pre code) {
padding-inline: 0.2em;
word-break: keep-all;
/* Never break inside a code span. word-break: keep-all would not
suffice: a hard hyphen is an explicit break opportunity (UAX #14),
which keep-all does not suppress — `--arg` could still split after
the dashes. Inline code is short, so nowrap is safe here. */
white-space: nowrap;
color: color-mix(currentColor 70%, var(--muted));
}