-
Notifications
You must be signed in to change notification settings - Fork 684
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] Audit details of break-spaces value against use cases #2465
Comments
On the one hand, I agree that over all, the various properties that affect line breaking and space preservation are a complicated mess from a UI point of view, and are hardly intuitive. It can be explained why which does what, but that's not the same thing. Within that, I think overflow-wrap: break-spaces is not that unusual. It is not terribly obvious why that's there, but it can work, and it can be explained: The property is to deal with wrapping when the line would overwise overflow. Spaces at the end of the line are defined to overflow as "hanging" (which is either just ink overflow, or scrollable overflow, see #2398). Therefore, dealing with it there is OK. Arguably, the value could also be attached to the Anyway, I am not objecting to better property design if there is a better solution, but I think that most likely, the better thing to do is to give it a rest, keep the current design we landed on, let people implement this (at least igalia is about to, and comments from others suggest that it may be in other people's roadmap as well). We may have a better chance at a sane UX by trying for nicer shorthand syntax in level 4, to paper over the mess that these various properties are in general, not limited to this question. |
@litherum I believe you were looking into implementing this. Any opinion? |
I was asked to have a look at this as someone who teaches this stuff. I'm not completely familiar with the whole spec but have read the linked meeting minutes. From an initial read I think I have a reasonable preference for how it is currently specified (as the I think I'd describe this as "overflowing whitespace", and I think that would be something any author would understand. Making the property seem sensible. |
Right, that makes sense to me. So I think we should not change this syntax. What we do need to tweak is that when |
The Working Group just discussed
The full IRC log of that discussion<dael_> Topic: Audit details of break-spaces value against use cases<dael_> github: https://github.com//issues/2465 <dael_> astearns: These are things we're rounding back to. <dael_> astearns: This issue needs to be address to unblock something <dael_> flackr: Igalia is about to impl and needs this closed. <dael_> fantasai: There's several slight details. This is about break-spaces. Goal on some property is thre's a mode where editing says when you're tyuping a space <dael_> fantasai: We want carat to move forward, spaces to not overflow as long as it' smore then 1em wide box so spaces don't hang. <dael_> fantasai: There's currently a break spaces value on overflow wrap, but right now spaces are defined as can hang at end of line. <dael_> fantasai: There's side effects of this. When you have a word at the end of the line and it fits but the space doesn't, even though you're breaking spaces it doens't move to next line but it does overflow. If you want things to wrap it's a problem this space overflows. <dael_> fantasai: Related issue is that when you're trying to define intrinisic size of this box if the space is hanging it's not counted but if you want it visible you want to count it. <dael_> fantasai: Seems to me if we want the space to behave like normal visible character, it should also effect size and not be hanging. <dael_> fantasai: This means if the word fits and you type a space if the word fits it will wrap and we measure the space when measuring intrinisic size <dael_> frWe fixed an issue in edge when people expect content:editible and not to wrap at same places because they use it for underlines. They use it as a rendering of the text. <dael_> florian: So rendering should be same either way even if the reason is because when it's editable you wouldn't want anything else. <dael_> florian: We're not proposing a difference, we're proposing both modes are same but when you're in editing the new behavior is sane, not almost sane. <dael_> fremy: WE did the reverse. <dael_> fremy: We made it so that when layout not taking space <dael_> fantasai: fremy fix where you made them match that's good and if they want spaces to show and say break-spaces the spaces take up space. <dael_> florian: But why align editable and not to not take space. <dael_> fremy: Most content web is spaces not so we changed to that case. <dael_> florian: It's hanging but it's there. <dael_> fantasai: Edge behavior is in the spec now as most recommended as I recell <dael_> fantasai: Change is that spaces don't hang when break-spaces is specified. <dael_> florian: Rest is consiquences of that. <dael_> fremy: Sounds good. <fantasai> s/consiq/conseq/ <dael_> astearns: Obj to Spaces don't hang when break-spaces is specified? <dael_> RESOLVED: Spaces don't hang when break-spaces is specified |
Goes together with the spec changes for w3c/csswg-drafts#2465
Goes together with the spec changes for w3c/csswg-drafts#2465
@fantasai I've made a Pull request for the spec and one for the tests. Review appreciated. |
[css-text-3] Spaces don't hang when break-spaces is specified Closes #2465
So, Igalia+Google are in the middle of implementing this, and have suggested we make a change to the syntax: instead of having Pros:
Cons:
The set of property and values that control line breaking and white space is messy and hard to understand anyway, and I don't think we can find a perfectly elegant answer. We've been renaming and shuffling this value between various properties for the last 3 years or so. Chasing perfect is the enemy of good. Personally, I think either alternative is OK. Given that this request comes from the first implementation effort, I am inclined to support it, so that we can ship this asap, and finally put it in the hands of authors. If the WG is firmly against that change, I'm OK with that too, and hope that Igalia+Google can live with that. Either way, we should resolve and move on. CCing people who have previously opined: @javifernandez @kojiishi @fantasai @litherum @tabatkins @rachelandrew |
@fantasai spec and tests PR done. Review appreciated. |
Goes together with the spec changes for w3c/csswg-drafts#2465
…ing, a=testonly Automatic update from web-platform-tests [css-text] overflow-wrap and intrinsic sizing Goes together with the spec changes for w3c/csswg-drafts#2465 -- [css-text] break-spaces has moved from overflow-wrap to white-space -- Merge pull request #10627 from frivoal/text-2465 [css-text] white-space and intrinsic sizing -- wpt-commits: b439b5793f217eeb5ec1dd941161f6206ab2938d, ae2ef2d8cf5cab2db0a477411ea7f9cc79f6f737, 67b751ef3b96755111d9f845efd3b21c014d68bc wpt-pr: 10627
…ing, a=testonly Automatic update from web-platform-tests [css-text] overflow-wrap and intrinsic sizing Goes together with the spec changes for w3c/csswg-drafts#2465 -- [css-text] break-spaces has moved from overflow-wrap to white-space -- Merge pull request #10627 from frivoal/text-2465 [css-text] white-space and intrinsic sizing -- wpt-commits: b439b5793f217eeb5ec1dd941161f6206ab2938d, ae2ef2d8cf5cab2db0a477411ea7f9cc79f6f737, 67b751ef3b96755111d9f845efd3b21c014d68bc wpt-pr: 10627
…ing, a=testonly Automatic update from web-platform-tests [css-text] overflow-wrap and intrinsic sizing Goes together with the spec changes for w3c/csswg-drafts#2465 -- [css-text] break-spaces has moved from overflow-wrap to white-space -- Merge pull request #10627 from frivoal/text-2465 [css-text] white-space and intrinsic sizing -- wpt-commits: b439b5793f217eeb5ec1dd941161f6206ab2938d, ae2ef2d8cf5cab2db0a477411ea7f9cc79f6f737, 67b751ef3b96755111d9f845efd3b21c014d68bc wpt-pr: 10627
…ing, a=testonly Automatic update from web-platform-tests [css-text] overflow-wrap and intrinsic sizing Goes together with the spec changes for w3c/csswg-drafts#2465 -- [css-text] break-spaces has moved from overflow-wrap to white-space -- Merge pull request #10627 from frivoal/text-2465 [css-text] white-space and intrinsic sizing -- wpt-commits: b439b5793f217eeb5ec1dd941161f6206ab2938d, ae2ef2d8cf5cab2db0a477411ea7f9cc79f6f737, 67b751ef3b96755111d9f845efd3b21c014d68bc wpt-pr: 10627
…ing, a=testonly Automatic update from web-platform-tests [css-text] overflow-wrap and intrinsic sizing Goes together with the spec changes for w3c/csswg-drafts#2465 -- [css-text] break-spaces has moved from overflow-wrap to white-space -- Merge pull request #10627 from frivoal/text-2465 [css-text] white-space and intrinsic sizing -- wpt-commits: b439b5793f217eeb5ec1dd941161f6206ab2938d, ae2ef2d8cf5cab2db0a477411ea7f9cc79f6f737, 67b751ef3b96755111d9f845efd3b21c014d68bc wpt-pr: 10627 UltraBlame original commit: 548c1791954799e3a2c50dcdb8f2b606c6cb13ea
…ing, a=testonly Automatic update from web-platform-tests [css-text] overflow-wrap and intrinsic sizing Goes together with the spec changes for w3c/csswg-drafts#2465 -- [css-text] break-spaces has moved from overflow-wrap to white-space -- Merge pull request #10627 from frivoal/text-2465 [css-text] white-space and intrinsic sizing -- wpt-commits: b439b5793f217eeb5ec1dd941161f6206ab2938d, ae2ef2d8cf5cab2db0a477411ea7f9cc79f6f737, 67b751ef3b96755111d9f845efd3b21c014d68bc wpt-pr: 10627 UltraBlame original commit: a83642423ce28e3ac921c43b23b7e8b7ac24be57
…ing, a=testonly Automatic update from web-platform-tests [css-text] overflow-wrap and intrinsic sizing Goes together with the spec changes for w3c/csswg-drafts#2465 -- [css-text] break-spaces has moved from overflow-wrap to white-space -- Merge pull request #10627 from frivoal/text-2465 [css-text] white-space and intrinsic sizing -- wpt-commits: b439b5793f217eeb5ec1dd941161f6206ab2938d, ae2ef2d8cf5cab2db0a477411ea7f9cc79f6f737, 67b751ef3b96755111d9f845efd3b21c014d68bc wpt-pr: 10627 UltraBlame original commit: 548c1791954799e3a2c50dcdb8f2b606c6cb13ea
…ing, a=testonly Automatic update from web-platform-tests [css-text] overflow-wrap and intrinsic sizing Goes together with the spec changes for w3c/csswg-drafts#2465 -- [css-text] break-spaces has moved from overflow-wrap to white-space -- Merge pull request #10627 from frivoal/text-2465 [css-text] white-space and intrinsic sizing -- wpt-commits: b439b5793f217eeb5ec1dd941161f6206ab2938d, ae2ef2d8cf5cab2db0a477411ea7f9cc79f6f737, 67b751ef3b96755111d9f845efd3b21c014d68bc wpt-pr: 10627 UltraBlame original commit: a83642423ce28e3ac921c43b23b7e8b7ac24be57
…ing, a=testonly Automatic update from web-platform-tests [css-text] overflow-wrap and intrinsic sizing Goes together with the spec changes for w3c/csswg-drafts#2465 -- [css-text] break-spaces has moved from overflow-wrap to white-space -- Merge pull request #10627 from frivoal/text-2465 [css-text] white-space and intrinsic sizing -- wpt-commits: b439b5793f217eeb5ec1dd941161f6206ab2938d, ae2ef2d8cf5cab2db0a477411ea7f9cc79f6f737, 67b751ef3b96755111d9f845efd3b21c014d68bc wpt-pr: 10627 UltraBlame original commit: 548c1791954799e3a2c50dcdb8f2b606c6cb13ea
…ing, a=testonly Automatic update from web-platform-tests [css-text] overflow-wrap and intrinsic sizing Goes together with the spec changes for w3c/csswg-drafts#2465 -- [css-text] break-spaces has moved from overflow-wrap to white-space -- Merge pull request #10627 from frivoal/text-2465 [css-text] white-space and intrinsic sizing -- wpt-commits: b439b5793f217eeb5ec1dd941161f6206ab2938d, ae2ef2d8cf5cab2db0a477411ea7f9cc79f6f737, 67b751ef3b96755111d9f845efd3b21c014d68bc wpt-pr: 10627 UltraBlame original commit: a83642423ce28e3ac921c43b23b7e8b7ac24be57
https://lists.w3.org/Archives/Public/www-archive/2018Mar/0002.html
The text was updated successfully, but these errors were encountered: