You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[css-text-4] Renaming text-space-* to white-space-* #8273
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:
Do we still have a conflict problem with XSL:FO?
If not, do we want to switch up the names to white-space-*?
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 white-space-collapse might be confused with margin-collapse, so that inline-space-collapse might be better?
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.
It also seems to me that white-space-collapse might be confused with margin-collapse, so that inline-space-collapse might be better?
No, CSS authors are used to white-space referring to actual space characters and not to margins or padding. Meanwhile inline is currently used as a prefix/suffix indicating things affecting the inline axis vs the block axis (e.g. we have margin-inline as a shorthand for margin-inline-start and margin-inline-end, which are our equivalents to XSL's margin-start and margin-end).
@SebastianZ There's no doubt in my mind that white-space-collapse is the better name. We were asked to move away from that by the XSL:FO folks a couple decades ago; but since Liam and Murakami think it's okay I think the obvious thing is to rename them back.
The CSS Working Group just discussed [css-text-4] Renaming text-space-* to white-space-*, and agreed to the following:
RESOLVED: rename `text-space-collapse` back to `white-space-collapse`
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!
Activity
liamquin commentedon Dec 31, 2022
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
white-space-collapsemight be confused with margin-collapse, so thatinline-space-collapsemight be better?[1] https://www.w3.org/TR/xsl/#white-space-collapse
[2] https://www.w3.org/TR/xsl/#white-space-treatment
MurakamiShinyu commentedon Jan 3, 2023
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.
fantasai commentedon Jan 26, 2023
Thanks very much, @MurakamiShinyu and @liamquin ! Agenda+ to propose renaming.
No, CSS authors are used to
white-spacereferring to actual space characters and not to margins or padding. Meanwhileinlineis currently used as a prefix/suffix indicating things affecting the inline axis vs the block axis (e.g. we havemargin-inlineas a shorthand formargin-inline-startandmargin-inline-end, which are our equivalents to XSL'smargin-startandmargin-end).SebastianZ commentedon Jan 30, 2023
Another reason to rename
text-space-*is that it can easily get confused withtext-spacing(and possible longhands as discussed in #4246).And the reason why I proposed to rename them to
white-space-*is that those properties are meant to be longhands for thewhite-spaceproperty.Sebastian
fantasai commentedon Feb 2, 2023
@SebastianZ There's no doubt in my mind that
white-space-collapseis the better name. We were asked to move away from that by the XSL:FO folks a couple decades ago; but since Liam and Murakami think it's okay I think the obvious thing is to rename them back.css-meeting-bot commentedon Feb 22, 2023
The CSS Working Group just discussed
[css-text-4] Renaming text-space-* to white-space-*, and agreed to the following:RESOLVED: rename `text-space-collapse` back to `white-space-collapse`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!
fantasai commentedon Mar 1, 2023
Fixed in 3050d05
[white-space] Split wrapping and `break-spaces`
[css-text-4] Rename text-space-trim to white-space-trim. #8436 #8273
Use white-space-collapse property instead of old name for it
Use white-space-collapse property instead of old name for it
Change `text-space-collapse` to `white-space-collapse` as per CSS-Text-4
Change `text-space-collapse` to `white-space-collapse` as per CSS-Tex…
Bug 1993653 [wpt PR 55349] - Change `text-space-collapse` to `white-s…
Change `text-space-collapse` to `white-space-collapse` as per CSS-Tex…