Skip to content

[css-text-4] add 'avoid' to text-wrap-mode #9448

@bradkemper

Description

@bradkemper

in #9102 (comment)_, we are working on the name of the onoff longhand property for white-space or text-wrap. The values for text-wrap-mode are already decided as wrap | nowrap.

I am suggesting a third value be added, avoid-wrap (or maybe just avoid). This would take the place of a separate (binary) wrap-inside property. It would also make the text-wrap-mode property (whatever we call it) not be just a binary toggle, because it would have three values now.

I think this is easier for authors than learning a new property (it's getting complicated enough anyway). Since wrap-inside: avoid is basically a relaxed version of text-wrap-mode: nowrap (provisional property name), I think it fits more naturally in the same property.

One implication of making this change is that the property value would be inherited, like the other values of the text-wrap-mode property. But I think this is better anyway, so that if a paragraph is avoiding wraps where possible, so would its children (such as a long <b> element).

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