Skip to content

[css-text-3] Switch line-breaking handling of atomic inlines #4949

@fantasai

Description

@fantasai

CSS Text tried to define that atomic inlines behave like ID characters with respect to line breaking (e.g., breaks between an atomic inline and a closing parenthesis or comma is forbidden). We had to alter that to allow breaks between atomic inlines and nbsp due to compat. More recently, #4576 found that there were sites depending on the "always breakable" behavior of atomic inlines with punctuation as well. This means by default, atomic inlines need to always allow breaks before and after the atomic inline, regardless of what character is there.

The problem is that this is an unnatural line breaking pattern for things like emoticons, gaiji, or other images that are intended to behave like text. We need some way to switch atomic inlines into this mode.

Two proposals were raised on the thread in #4576:

  • Re-use the inheritable line-break for this purpose: values other than auto (the initial value) treat atomic inlines like ID.
  • Introduce a new value for the non-inherited wrap-before and wrap-after properties in CSS Text Level 4 to make this distinction.

A third option would be to introduce yet another line-breaking property dedicated to this problem. Fourth option is not to solve. (Personally I do not prefer these solutions as we have way too many line-breaking controls already, and I do think this is a problem worth solving.)

What do we want to do here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs Thoughtcss-text-4i18n-trackerGroup bringing to attention of Internationalization, or tracked by i18n but not needing response.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions