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] Does break-spaces + break-word allow breaking before the first trailing white-space ? #3221

Closed
javifernandez opened this issue Oct 17, 2018 · 3 comments
Assignees
Labels
Closed Rejected as OutOfScope Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-text-3 Current Work Tested Memory aid - issue has WPT tests

Comments

@javifernandez
Copy link
Contributor

According to the spec, 'white-space: break-space' allows breaking AFTER any preserved white space.

https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces

A line breaking opportunity exists after every preserved white space character, including between white space characters.

Additionally, the spec states the following on 'overflow-wrap: break-word':

https://drafts.csswg.org/css-text-3/#valdef-overflow-wrap-break-word

An otherwise unbreakable sequence of characters may be broken at an arbitrary point if there are no otherwise-acceptable break points in the line.

So, combining both properties with such values I understand that a there is a breaking opportunity before the first preserved white-space following a word if it overflows. However, this shouldn't be allowed if there are other breaking opportunities before (eg, a leading white-space).

If I understood it correctly, then I think that these two test are somehow contradictory:

The first test (break-spaces-003.html) expects the second ' XX' string to be wrapped, preserving the white-space as leading character. However, the second test expects the word to be wrapped after the leading white-space, so that 'FAIL ' goes to the second line.

@frivoal
Copy link
Collaborator

frivoal commented Oct 18, 2018

So, combining both properties with such values I understand that a there is a breaking opportunity before the first preserved white-space following a word if it overflows. However, this shouldn't be allowed if there are other breaking opportunities before (eg, a leading white-space).

Correct.

If I understood it correctly, then I think that these two test are somehow contradictory

You're right. break-spaces-003.html was written back when the spec said something different, and is now incorrect. I'll make a pull request to delete it.

frivoal added a commit to frivoal/wpt that referenced this issue Oct 18, 2018
This was written based on a previous version of the spec, and is no
longer correct.

css/css-text/overflow-wrap/overflow-wrap-break-word-002.html checks the
correct behavior instead.

Reported in w3c/csswg-drafts#3221
@frivoal
Copy link
Collaborator

frivoal commented Oct 18, 2018

PR: web-platform-tests/wpt#13589

frivoal added a commit to frivoal/wpt that referenced this issue Oct 19, 2018
This was written based on a previous version of the spec, and is no
longer correct.

css/css-text/overflow-wrap/overflow-wrap-break-word-002.html checks the
correct behavior instead.

Reported in w3c/csswg-drafts#3221
@frivoal frivoal added Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. Closed Rejected as OutOfScope labels Oct 20, 2018
@frivoal
Copy link
Collaborator

frivoal commented Oct 20, 2018

The tests are fixed, so closing, and this wasn't really a spec problem, so closing as OutOfScope, for the lack of a more approprioate status.

@frivoal frivoal closed this as completed Oct 20, 2018
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Nov 7, 2018
Automatic update from web-platform-tests[css-text] Remove stale tests

This was written based on a previous version of the spec, and is no
longer correct.

css/css-text/overflow-wrap/overflow-wrap-break-word-002.html checks the
correct behavior instead.

Reported in w3c/csswg-drafts#3221

--
Merge pull request #13589 from frivoal/text-3221

[css-text] Remove stale test
--

wpt-commits: 267f7dcb3019ca3a4483bc81de7270e37e0d7421, cabd743ac65d556c29f179952bde80d162768914
wpt-pr: 13589
xeonchen pushed a commit to xeonchen/gecko that referenced this issue Nov 8, 2018
Automatic update from web-platform-tests[css-text] Remove stale tests

This was written based on a previous version of the spec, and is no
longer correct.

css/css-text/overflow-wrap/overflow-wrap-break-word-002.html checks the
correct behavior instead.

Reported in w3c/csswg-drafts#3221

--
Merge pull request #13589 from frivoal/text-3221

[css-text] Remove stale test
--

wpt-commits: 267f7dcb3019ca3a4483bc81de7270e37e0d7421, cabd743ac65d556c29f179952bde80d162768914
wpt-pr: 13589
@frivoal frivoal added the Tested Memory aid - issue has WPT tests label Apr 25, 2019
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 3, 2019
Automatic update from web-platform-tests[css-text] Remove stale tests

This was written based on a previous version of the spec, and is no
longer correct.

css/css-text/overflow-wrap/overflow-wrap-break-word-002.html checks the
correct behavior instead.

Reported in w3c/csswg-drafts#3221

--
Merge pull request #13589 from frivoal/text-3221

[css-text] Remove stale test
--

wpt-commits: 267f7dcb3019ca3a4483bc81de7270e37e0d7421, cabd743ac65d556c29f179952bde80d162768914
wpt-pr: 13589

UltraBlame original commit: 7288243365f58a866a6abc313bb6e7df5d6defa2
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 3, 2019
Automatic update from web-platform-tests[css-text] Remove stale tests

This was written based on a previous version of the spec, and is no
longer correct.

css/css-text/overflow-wrap/overflow-wrap-break-word-002.html checks the
correct behavior instead.

Reported in w3c/csswg-drafts#3221

--
Merge pull request #13589 from frivoal/text-3221

[css-text] Remove stale test
--

wpt-commits: 267f7dcb3019ca3a4483bc81de7270e37e0d7421, cabd743ac65d556c29f179952bde80d162768914
wpt-pr: 13589

UltraBlame original commit: 7288243365f58a866a6abc313bb6e7df5d6defa2
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 3, 2019
Automatic update from web-platform-tests[css-text] Remove stale tests

This was written based on a previous version of the spec, and is no
longer correct.

css/css-text/overflow-wrap/overflow-wrap-break-word-002.html checks the
correct behavior instead.

Reported in w3c/csswg-drafts#3221

--
Merge pull request #13589 from frivoal/text-3221

[css-text] Remove stale test
--

wpt-commits: 267f7dcb3019ca3a4483bc81de7270e37e0d7421, cabd743ac65d556c29f179952bde80d162768914
wpt-pr: 13589

UltraBlame original commit: 7288243365f58a866a6abc313bb6e7df5d6defa2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Rejected as OutOfScope Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-text-3 Current Work Tested Memory aid - issue has WPT tests
Projects
None yet
Development

No branches or pull requests

3 participants