Skip to content

[css-text] inline elements should not introduce a forced line break or soft wrap opportunity #3886

Closed

Description

@frivoal

The spec already says that out of flow elements do not introduce a forced line break or soft wrap opportunity, but it doesn't say that inline elements don't either. It should.

We already have a test for that (https://wpt.fyi/results/css/css-text/line-breaking/line-breaking-015.html). wpt.fyi reports passing in all browsers other than chrome, but it does pass in Chrome 76 on my machine not sure if that's a matter of version or of environment.

Activity

  1. self-assigned this
    on May 2, 2019
  2. css-meeting-bot commented on May 8, 2019

    @css-meeting-bot
    Member

    The CSS Working Group just discussed inline boundaries and wrapping, and agreed to the following:

    • RESOLVED: Inline box boundaries don't affect line breaking opportunities
    The full IRC log of that discussion <fantasai> Topic: inline boundaries and wrapping
    <fantasai> github: https://github.com//issues/3886
    <fantasai> florian: out-of-flow elements don't introduce a soft wrap opportunity
    <fantasai> florian: But doesn't say about inline boundaries
    <fantasai> florian: We have a WPT test for this, but not backed by spec
    <fantasai> florian: In the past Chrome had a bug where inline element boundaries suppressed wrap opportunities
    <fantasai> florian: Now sometimes have opposite bug that inline boundary introduces wrap opportunity
    <fantasai> florian: Any pushback that putting a span around things doesn't change where line breaks can happen?
    <fantasai> fantasai: No, we should definitely spec this
    <fantasai> fantasai: "Inline boundaries don't affect line breaking opportunities"
    <fantasai> RESOLVED: Inline box boundaries don't affect line breaking opportunities
  3. kojiishi commented on May 9, 2019

    @kojiishi
    Contributor

    I think this is related with #3897, and that the text might be better to include what @jfkthame pointed out.

    Example:

    <div><break-all><nowrap>1234567</nowrap><nowrap>1234567</nowrap></break-all></div>
    

    In this case, there should be a break opportunity between "7" and "1", but great if @fantasai can confirm her intent.

  4. frivoal commented on May 9, 2019

    @frivoal
    CollaboratorAuthor

    I don't think it's strongly related. If you change the style of an inline element to something that has different line breaking rules, that has an impact (and I'll follow up on that in #3897), but if there's not style change (or style changes unrelated to line breaking), the presence of an element boundary itself shouldn't make any difference: that's what we discussed here.

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions