-
Notifications
You must be signed in to change notification settings - Fork 674
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-4] Renaming text-space-* to white-space-* #8273
Comments
white-space-collapse in XSL-FO [1] when true replaces sequences of white space other than linefeed with the first white space in a sequence, so e.g. multiple spaces get turned into a single space everywhere. white-space-treatment in XSL-FO [2] controls whether spaces go away around linefeeds, e.g. including after wrapping. Although XSL-FO is certainly being used, and there are multiple active implementations, i'm not sure how much it matters if CSS itself has a property with a name used by XSL-FO. You could think of XSL-FO as an XML vocabulary that incorporates CSS for styling, though. Because of weird W3C process rules, the XSL-FO spec actually includes a copy of the CSS 2.1 properties, so that it could be published as a Recommendation, but the intent was that they would be the same. However, XSL-FO property values are generally expressions, almost as if they were implicitly surrounded with "calc(...)", so there are limits on how compatible they can be. Antenna House have a product that implements both CSS and XSL-FO, so they might be affected, but, again, in FO mode the values are interpreted differently anyway. A bigger question is whether users would be confused. However, XSL-FO is primarily used in cases where CSS for paged media isn't ready or isn't sophisticated enough, and the stylesheet authors are more likely to cope with the confusion than many other users. I do think it would be better to avoid the confusion if possible, though. It also seems to me that [1] https://www.w3.org/TR/xsl/#white-space-collapse |
I worked on Antenna House's XSL-FO & CSS implementation in the past, but presently I am not in that position. So this is my guess, but they and their users will not be much troubled by this renaming, because properties of XSL-FO and CSS are already quite different. My impression is that "white-space-*" is a natural naming for the longhand properties of the "white-space" shorthand property. |
Thanks very much, @MurakamiShinyu and @liamquin ! Agenda+ to propose renaming.
No, CSS authors are used to |
Another reason to rename And the reason why I proposed to rename them to Sebastian |
@SebastianZ There's no doubt in my mind that |
The CSS Working Group just discussed
The full IRC log of that discussion<dbaron> fantasai: This issue... a long time ago we had a `white-space-collapse` which together with `text-wrap` were longhands of `white-space`.<dbaron> fantasai: XSLFO folks complained that, since we organized the value space to be spimpler than XSLFOs, complained about naming collisoon, so we renamed (but less clear) <dbaron> fantasai: 2 decades later, we want to rename back, confirmation from Liam Quin and Murakami-san that it's OK to rename back to the more easily understood name. <dbaron> astearns: Implementation status of text-space properties? <dbaron> fantasai: AS far as I know, nobody. <fantasai> s/we want/someone asked/ <dbaron> astearns: so good time to rename <dbaron> astearns: any concerns with going back to `white-space-collapse`? <dbaron> RESOLVED: rename `text-space-collapse` back to `white-space-collapse` <SebastianZ> Perfect! |
Fixed in 3050d05 |
In the previous refactoring to avoid using `EWhiteSpace`[1][2], the `break-spaces` was combined with `text-wrap` because the spec hasn't determined yet and it was natural for our code. Now it was put on the `white-space-collapse` property. This patch: * Incorporates naming change of `text-space-collapse`[3]. * Split functions for wrapping and `break-spaces` because they will be on separate properties. Some of rewrites check `ShouldWrapLine()` and some don't. This aligns with the code before the refactoring[1][2]. This patch has no behavior changes. [1] https://chromium.googlesource.com/chromium/src/+/fbbeeb9e8237c7bafbbc8129977aa603dd2d3d7b%5E%21/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc [2] https://chromium.googlesource.com/chromium/src/+/d23707305dd5d94c39486d1d0665fc63d091c4bf%5E%21/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc [3] w3c/csswg-drafts#8273 Bug: 1417543, 1418455 Change-Id: Ib10b602ed985681df6d2bf3768d2245f176253a1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4301459 Auto-Submit: Koji Ishii <[email protected]> Commit-Queue: Koji Ishii <[email protected]> Commit-Queue: Yoshifumi Inoue <[email protected]> Reviewed-by: Yoshifumi Inoue <[email protected]> Cr-Commit-Position: refs/heads/main@{#1112101}
In #448 @SebastianZ asked about renaming the text-space-collapse/trim properties to white-space-*. Historically there was some kind of conflict problem with XSL:FO's white-space-collapse, which takes a different set of values, which is why we had to rename it to something else.
I'm filing this issue to ask two questions:
CC @MurakamiShinyu @liamquin
The text was updated successfully, but these errors were encountered: