Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
frivoal opened this issue May 2, 2019 · 3 comments
Assignees
Labels

Comments

@frivoal
Copy link
Collaborator

frivoal commented May 2, 2019

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.

@frivoal frivoal added the css-text-3 Current Work label May 2, 2019
@frivoal frivoal self-assigned this May 2, 2019
@css-meeting-bot
Copy link
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

@kojiishi
Copy link
Contributor

kojiishi commented May 9, 2019

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.

@frivoal
Copy link
Collaborator Author

frivoal commented May 9, 2019

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
Labels
Projects
None yet
Development

No branches or pull requests

4 participants