Sitelet https://github.com/w3c/csswg-drafts/issues/14559
Skip to content

[css-text-4] Add more granular control over automatic hyphenation at line breaks #14559

Description

@johannesodland

Browsers support automatic hyphenation using language-specific dictionaries.
Unfortunately, the current standards do not allow browser engines to discriminate between different types of hyphenation opportunities. Compound word boundaries are treated the same as syllable breaks.

Many public sector sites are required to use plain language to ensure readers can easily find, understand and use information. The requirement includes the structure and visual design of the text.

As the current spec treats all line-break opportunities equally, automatic hyphenation can slow down reading speed and hinder comprehension, conflicting with these plain language requirements.

Breaking words between syllables can make it significantly harder for readers to recognize the individual parts of a word, forcing the reader to re-scan it.

In compound-heavy languages, it is still necessary to allow line breaks in words. Otherwise they would overflow, or cause large empty gaps when they are forced entirely to a new line. In these situations, breaking the words at the compound joins is less likely to cause issues with reading speed and comprehension.

Currently, the only way to achieve this is to manually insert soft hyphens to ensure words break at the desired locations. This is time-consuming and tedious, and is often omitted by authors.

Proposed solution:

Option 1:
Allow authors to define the type of hyphenation opportunities that can be taken through a property such as hyphenate-mode: compound-only

Option 2:
Allow authors to provide a custom hyphenation dictionary. An early version of css-text included custom hyphenation resources, but this was dropped in later revisions.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions