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-4] Rename trim-auto to trim-both #10161

Closed
fantasai opened this issue Mar 29, 2024 · 8 comments
Closed

[css-text-4] Rename trim-auto to trim-both #10161

fantasai opened this issue Mar 29, 2024 · 8 comments

Comments

@fantasai
Copy link
Collaborator

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

@MurakamiShinyu
Copy link
Collaborator

I agree it's better naming trim-both for "trim both start and end".

@frivoal
Copy link
Collaborator

frivoal commented Apr 1, 2024

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.

@fantasai
Copy link
Collaborator Author

fantasai commented Apr 1, 2024

@frivoal Yeah, but normal and trim-start also do the middle part. The auto-middle part is just baseline behavior at this point.

@MurakamiShinyu
Copy link
Collaborator

MurakamiShinyu commented Apr 1, 2024

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.

@MurakamiShinyu
Copy link
Collaborator

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

<spacing-trim> = space-all | normal | trim-both | trim-start | space-first | trim-all

to

<spacing-trim> = space-all | normal | space-first | trim-start | trim-both | trim-all

(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.

@MurakamiShinyu
Copy link
Collaborator

MurakamiShinyu commented Apr 10, 2024

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).

@css-meeting-bot
Copy link
Member

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

@fantasai
Copy link
Collaborator Author

Edited in, thanks @MurakamiShinyu for all of your comments and suggestions!

frivoal added a commit to frivoal/wpt that referenced this issue May 29, 2024
frivoal added a commit to web-platform-tests/wpt that referenced this issue May 29, 2024
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Jun 3, 2024
Automatic update from web-platform-tests
Rename trim-auto to trim-both

See w3c/csswg-drafts#10161

--

wpt-commits: 448fee1581cff98e9052a3d5d5640fbb7319a530
wpt-pr: 46531
ErichDonGubler pushed a commit to erichdongubler-mozilla/firefox that referenced this issue Jun 5, 2024
Automatic update from web-platform-tests
Rename trim-auto to trim-both

See w3c/csswg-drafts#10161

--

wpt-commits: 448fee1581cff98e9052a3d5d5640fbb7319a530
wpt-pr: 46531
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this issue Jun 14, 2024
Automatic update from web-platform-tests
Rename trim-auto to trim-both

See w3c/csswg-drafts#10161

--

wpt-commits: 448fee1581cff98e9052a3d5d5640fbb7319a530
wpt-pr: 46531
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants