Anonymous View
Skip to content

CSS 'hyphens' description added#44363

Merged
chrisdavidmills merged 3 commits into
mainfrom
estelle-patch-10
Jun 10, 2026
Merged

CSS 'hyphens' description added#44363
chrisdavidmills merged 3 commits into
mainfrom
estelle-patch-10

Conversation

@estelle

@estelle estelle commented Jun 5, 2026

Copy link
Copy Markdown
Member

added a description.
added text to the examples
de-notified as the text is just part of the description now

added a description.
added text to the examples
de-notified as the text is just part of the description now
@estelle estelle requested a review from a team as a code owner June 5, 2026 14:45
@estelle estelle requested review from chrisdavidmills and removed request for a team June 5, 2026 14:45
@github-actions github-actions Bot added Content:CSS Cascading Style Sheets docs size/s [PR only] 6-50 LoC changed labels Jun 5, 2026
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Preview URLs (1 page)

(comment last updated: 2026-06-09 18:33:32)

@chrisdavidmills chrisdavidmills left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, @estelle. Just a few suggestions for you to mull over.

> If you apply [`word-break: break-all`](/en-US/docs/Web/CSS/Reference/Properties/word-break#break-all) then no hyphens are shown, even if the word breaks at a hyphenation point.
The `hyphens` property can be used to define how words should be hyphenated when text wraps across multiple lines. It can prevent hyphenation entirely, hyphenate at manually-specified points within the text, or let the browser automatically insert hyphens where appropriate.

Hyphenation rules are language-specific. In HTML, the language is determined by the [`lang`](/en-US/docs/Web/HTML/Reference/Global_attributes/lang) attribute. Browsers will only hyphenate if this attribute is present and the appropriate hyphenation dictionary is available. The `auto` setting's behavior depends on the language being properly tagged to select the appropriate hyphenation rules.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Hyphenation rules are language-specific. In HTML, the language is determined by the [`lang`](/en-US/docs/Web/HTML/Reference/Global_attributes/lang) attribute. Browsers will only hyphenate if this attribute is present and the appropriate hyphenation dictionary is available. The `auto` setting's behavior depends on the language being properly tagged to select the appropriate hyphenation rules.
Hyphenation rules are language-specific. In HTML, the language is determined by the [`lang`](/en-US/docs/Web/HTML/Reference/Global_attributes/lang) attribute. Browsers will only hyphenate if this attribute is present and the appropriate hyphenation dictionary is available. The efficacy of `hyphens: auto` depends on the language being properly tagged to select the appropriate hyphenation rules.

I thought it would be good to clarify what we mean by "auto", plus, really, we are talking about how effective it is, rather than some general behavior?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i just moved the note down. I have to go down a rabbit hole now....

Comment thread files/en-us/web/css/reference/properties/hyphens/index.md Outdated
In XML, the [`xml:lang`](/en-US/docs/Web/SVG/Reference/Attribute/xml:lang) attribute must be used. The specification does not define rules for how hyphenation is performed, so the exact hyphenation may vary from browser to browser.

## Suggesting line break opportunities
The {{cssxref("hyphenate-character")}} property can be used to specify an alternative hyphenation character to use at the end of the line being broken. If you apply [`word-break: break-all`](/en-US/docs/Web/CSS/Reference/Properties/word-break#break-all) then no hyphens are shown, even if the word breaks at a hyphenation point. If you apply {{cssxref("text-wrap-mode","text-wrap-mode: nowrap")}}, no wrapping occurs so no hyphens will appear.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"the end of the line being broken" is ambiguous. Do you mean the end of a sentence, or the point where a sentence breaks across two lines? Would be good to clarify.

Co-authored-by: Chris Mills <chrisdavidmills@gmail.com>
Comment thread files/en-us/web/css/reference/properties/hyphens/index.md Outdated
@estelle estelle requested a review from chrisdavidmills June 10, 2026 10:23

@chrisdavidmills chrisdavidmills left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good now, thanks, @estelle!

@chrisdavidmills chrisdavidmills merged commit 35704c8 into main Jun 10, 2026
13 checks passed
@chrisdavidmills chrisdavidmills deleted the estelle-patch-10 branch June 10, 2026 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:CSS Cascading Style Sheets docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants