Skip to content
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

[css-text-3] Define break at space to remove a space explicitly #4308

Closed
fantasai opened this issue Sep 15, 2019 · 7 comments
Closed

[css-text-3] Define break at space to remove a space explicitly #4308

fantasai opened this issue Sep 15, 2019 · 7 comments
Assignees
Labels
Closed Accepted by CSSWG Resolution css-text-3 Current Work i18n-alreq Arabic language enablement i18n-tracker Group bringing to attention of Internationalization, or tracked by i18n but not needing response. Tested Memory aid - issue has WPT tests Tracked in DoC

Comments

@fantasai
Copy link
Collaborator

We currently assume that the rules about trimming white space at the end of a line takes care of disappearing a space at which we break the text.

However, this isn't quite the case when there's bidi, see web-platform-tests/wpt#5461

We should define that for collapsible spaces, if the line-break opportunity taken is provided by that space, it is removed.

This is what makes sense (otherwise you'd end up with double spaces frequently in bidirectional text), and is also what seems to have been implemented.

@fantasai fantasai added css-text-3 Current Work Agenda+ i18n-tracker Group bringing to attention of Internationalization, or tracked by i18n but not needing response. i18n-alreq Arabic language enablement labels Sep 15, 2019
@kojiishi
Copy link
Contributor

Is it reasonable to do bidi-reordering after phase 2? The behavior would then be defined as desired, correct?

@frivoal
Copy link
Collaborator

frivoal commented Oct 2, 2019

In effect yes, although only for collapsible spaces. We can't hang non collapsible spaces that have been bidi-reordered to the middle of the line.

All browsers today do collapse/remove collapsible space that would have been at the end of the line prior to bidi reordering (AFAIK Edge&IE used to be different, as discussed in web-platform-tests/wpt#5461), so this change/clarification is safe:
https://jsbin.com/zepovaj/edit?html,css,output

@frivoal
Copy link
Collaborator

frivoal commented Oct 3, 2019

Actually, a little more testing shows that there's less interop than I thought:
https://jsbin.com/hijucaq/edit?html,css,output

ChromeFirefoxSafariEdge 18
Chrome Rendering Firefox Rendering Safari Rendering Edge Rendering

I think the behavior of Chrome and Firefox is preferable.

@fantasai
Copy link
Collaborator Author

@frivoal, this issue is only about collapsible spaces. If there's an issue about preserved spaces, can you file a separate issue? Otherwise it becomes too confusing for everyone to discuss.

@frivoal
Copy link
Collaborator

frivoal commented Oct 15, 2019

Sure, I'll split. I reported this here as it seemed to me that these are related problems, and that neither is clearly defined, and I discovered the inconsistency of pre-wrap while investigating normal, so it made sense to me to discuss them as a set, but keeping issues tightly scoped is useful.

@frivoal
Copy link
Collaborator

frivoal commented Oct 15, 2019

Edited in place my earlier comment to remove things that were not about collapsible spaces, and moved that content over to #4422

@css-meeting-bot
Copy link
Member

The CSS Working Group just discussed Define break at space to remove a space explicitly, and agreed to the following:

  • RESOLVED: Space before a line break is removed even if reordered to the middle of line by bidi reordering
The full IRC log of that discussion <dael> Topic: Define break at space to remove a space explicitly
<dael> github: https://github.com//issues/4308
<dael> florian: Turns out that it isn't exactly defined or interop impl what happens with interaction of dropping collapsible whitespace and bidi. If somethign would have been at the end of bidi moves it do you still drop it? Fuzzily defined. Chrome and FF do one thing, Safari and Edge HTML is different. I think Chrome/FF makes more sense. Screenshots in the issue
<dael> florian: I propose we adopt Chrome/FF behavior and task editors to define it
<dael> myles: Webkit would be willing to change
<dael> Rossen_: Edge HTML this could be considered. It's reasonable behavior
<dael> florian: Prop: Adopt the Chrome/FF behavior and action the editors to spec it
<dael> Rossen_: Can you be more specific?
<dael> fantasai: Spec before a line break is removed even if reorder to middle of line by bidi reordering
<dael> s/spec/space
<dael> RESOLVED: Space before a line break is removed even if reordered to the middle of line by bidi reordering

@frivoal frivoal self-assigned this Oct 17, 2019
frivoal added a commit to frivoal/wpt that referenced this issue Oct 17, 2019
frivoal added a commit to web-platform-tests/wpt that referenced this issue Oct 17, 2019
@frivoal frivoal added Tested Memory aid - issue has WPT tests and removed Needs Testcase (WPT) labels Oct 17, 2019
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Oct 24, 2019
…4308, a=testonly

Automatic update from web-platform-tests
[css-text-3] Tests for w3c/csswg-drafts#4308

--

wpt-commits: 7139beda48e44e9fa74694c333b44ca5def78df7
wpt-pr: 19751
xeonchen pushed a commit to xeonchen/gecko that referenced this issue Oct 24, 2019
…4308, a=testonly

Automatic update from web-platform-tests
[css-text-3] Tests for w3c/csswg-drafts#4308

--

wpt-commits: 7139beda48e44e9fa74694c333b44ca5def78df7
wpt-pr: 19751
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 27, 2019
…4308, a=testonly

Automatic update from web-platform-tests
[css-text-3] Tests for w3c/csswg-drafts#4308

--

wpt-commits: 7139beda48e44e9fa74694c333b44ca5def78df7
wpt-pr: 19751

UltraBlame original commit: 9015a1885bfea95e0a461806c9d00eb64c84a0b8
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 27, 2019
…4308, a=testonly

Automatic update from web-platform-tests
[css-text-3] Tests for w3c/csswg-drafts#4308

--

wpt-commits: 7139beda48e44e9fa74694c333b44ca5def78df7
wpt-pr: 19751

UltraBlame original commit: 9015a1885bfea95e0a461806c9d00eb64c84a0b8
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 27, 2019
…4308, a=testonly

Automatic update from web-platform-tests
[css-text-3] Tests for w3c/csswg-drafts#4308

--

wpt-commits: 7139beda48e44e9fa74694c333b44ca5def78df7
wpt-pr: 19751

UltraBlame original commit: 9015a1885bfea95e0a461806c9d00eb64c84a0b8
frivoal added a commit to web-platform-tests/wpt that referenced this issue Sep 10, 2020
fantasai added a commit that referenced this issue Dec 15, 2020
…ke implication informative, rather than declaring a special-case rule. Update to #4308
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Accepted by CSSWG Resolution css-text-3 Current Work i18n-alreq Arabic language enablement i18n-tracker Group bringing to attention of Internationalization, or tracked by i18n but not needing response. Tested Memory aid - issue has WPT tests Tracked in DoC
Projects
None yet
Development

No branches or pull requests

4 participants