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
Given the current set of values, and the fact that normal trims adjacent pairs and trim-start indicates trimming the start and adjacent pairs, I think trim-both might be a better name for trim-auto which trims the start, adjacent pairs, and end. Thoughts? CC @MurakamiShinyu@frivoal@kojiishi@myakura
trim-auto might not be amazing as a name, but "both" is a strage compoment for something that does 3 things: start, middle, and end. To me, the "auto" part mostly refers to the middle part, as that's what differentiates it from trim-all.
When I suggested (#4246 (comment)) renaming trim-all (now different thing) to trim-auto, I couldn't think of trim-both because at that time there was no trim-start value and the default included the "trim-end" behavior. But now, after other values changed, trim-both sounds not strange.
This is just an editorial suggestion related on renaming trim-auto to trim-both, I think it would be better to change the order of the value definitions from
(I think this is more natural: space-first is near normal and trim-both is near trim-all)
and the table of the "summary of what the various values do" would be changed to:
Value
Trim at line start
Trim at line end
Trim adjacent pairs
Trim everywhere
space-all
no
normal
no
only if would not fit
yes
no
space-first
yes except on the first line
trim-start
yes
trim-both
yes
trim-all
yes
auto
user-agent specific / platform dependent
With this table, it is much understandable that trim-both means trim at both line start and line end.
The other advantage of the name trim-both is that when the opposite value is needed in the future, the name space-both can be used.
I'm not sure if space-both (space at both line start and line end; trim adjacent pairs) is really needed in CSS, but Adobe InDesign has such a setting in its Mojikumi settings (文字組みアキ量設定), which is called "約物全角" (= "punctuation full-width", but note that adjacent pairs are trimmed).
The CSS Working Group just discussed [css-text-4] Rename `trim-auto` to `trim-both` , and agreed to the following:
RESOLVED: rename trim-auto to trim-both
The full IRC log of that discussion
<TabAtkins> fantasai: text-spacing has a bunch of values.
<TabAtkins> fantasai: as we've tweaked 'normal' and the proeprty syntax, we've gotten to a place where we have "normal" being a baseline behavior where we allow spacing at start/end of th eline, but collapse within the line
<TabAtkins> fantasai: And we have trim-start, trim-all, space-all, space-first
<fantasai> https://github.com//issues/10161#issuecomment-2033649072
<TabAtkins> fantasai: There's also trim-auto which is baseically trim-start + trim-end + the baseline "trim in the middle" behavior
<TabAtkins> fantasai: It makes sense to rename to trim-both, then
<TabAtkins> fantasai: Murakami-san seems to align on that
<TabAtkins> fantasai: I believe this is the one keyword not yet shipped by Chrome, so it should still be fixable
<TabAtkins> proposed resolution: rename trim-auto to trim-both
<TabAtkins> RESOLVED: rename trim-auto to trim-both
Activity
MurakamiShinyu commentedon Mar 31, 2024
I agree it's better naming
trim-bothfor "trim both start and end".frivoal commentedon Apr 1, 2024
trim-automight not be amazing as a name, but "both" is a strage compoment for something that does 3 things: start, middle, and end. To me, the "auto" part mostly refers to the middle part, as that's what differentiates it fromtrim-all.fantasai commentedon Apr 1, 2024
@frivoal Yeah, but
normalandtrim-startalso do the middle part. The auto-middle part is just baseline behavior at this point.MurakamiShinyu commentedon Apr 1, 2024
When I suggested (#4246 (comment)) renaming
trim-all(now different thing) totrim-auto, I couldn't think oftrim-bothbecause at that time there was notrim-startvalue and the default included the "trim-end" behavior. But now, after other values changed,trim-bothsounds not strange.MurakamiShinyu commentedon Apr 3, 2024
This is just an editorial suggestion related on renaming
trim-autototrim-both, I think it would be better to change the order of the value definitions fromto
(I think this is more natural:
space-firstis nearnormalandtrim-bothis neartrim-all)and the table of the "summary of what the various values do" would be changed to:
With this table, it is much understandable that
trim-bothmeans trim at both line start and line end.MurakamiShinyu commentedon Apr 10, 2024
The other advantage of the name
trim-bothis that when the opposite value is needed in the future, the namespace-bothcan be used.I'm not sure if
space-both(space at both line start and line end; trim adjacent pairs) is really needed in CSS, but Adobe InDesign has such a setting in its Mojikumi settings (文字組みアキ量設定), which is called "約物全角" (= "punctuation full-width", but note that adjacent pairs are trimmed).css-meeting-bot commentedon Apr 10, 2024
The CSS Working Group just discussed
[css-text-4] Rename `trim-auto` to `trim-both`, and agreed to the following:RESOLVED: rename trim-auto to trim-bothThe full IRC log of that discussion
<TabAtkins> fantasai: text-spacing has a bunch of values.<TabAtkins> fantasai: as we've tweaked 'normal' and the proeprty syntax, we've gotten to a place where we have "normal" being a baseline behavior where we allow spacing at start/end of th eline, but collapse within the line
<TabAtkins> fantasai: And we have trim-start, trim-all, space-all, space-first
<fantasai> https://github.com//issues/10161#issuecomment-2033649072
<TabAtkins> fantasai: There's also trim-auto which is baseically trim-start + trim-end + the baseline "trim in the middle" behavior
<TabAtkins> fantasai: It makes sense to rename to trim-both, then
<TabAtkins> fantasai: Murakami-san seems to align on that
<TabAtkins> fantasai: I believe this is the one keyword not yet shipped by Chrome, so it should still be fixable
<TabAtkins> proposed resolution: rename trim-auto to trim-both
<TabAtkins> RESOLVED: rename trim-auto to trim-both
[css-text-4] Rename trim-auto to trim-both #10161
fantasai commentedon Apr 11, 2024
Edited in, thanks @MurakamiShinyu for all of your comments and suggestions!
Rename trim-auto to trim-both
Rename trim-auto to trim-both
Bug 1899482 [wpt PR 46531] - Rename trim-auto to trim-both, a=testonly
Bug 1899482 [wpt PR 46531] - Rename trim-auto to trim-both, a=testonly