Skip to content

[css-text-4] Hyphenate only overflowing words? #616

@Nettsentrisk

Description

@Nettsentrisk

As far as I understand the spec, there is currently no proposed way of allowing a CSS author to only hyphenate words that overflow their container, instead of all words that cross the container edge.

This is especially an issue with headings, as an author may want to avoid excessive hyphenation in a larger heading text if possible.

The current implementations based on the spec will hyphenate every word that crosses the container edge opposite of what is set with the text-align property.

Relevant part of the spec:
https://drafts.csswg.org/css-text-3/#hyphens-property

An example:
http://codepen.io/Nettsentrisk/pen/wzYAbo

Blog post describing the problem:
https://www.epinova.no/en/blog/css-hyphenate-only-overflowing-words/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions