Skip to content

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

Closed

Description

@fantasai

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

Activity

  1. MurakamiShinyu commented on Mar 31, 2024

    @MurakamiShinyu

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

  2. frivoal commented on Apr 1, 2024

    @frivoal
    Collaborator

    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.

  3. fantasai commented on Apr 1, 2024

    @fantasai
    CollaboratorAuthor

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

  4. MurakamiShinyu commented on Apr 1, 2024

    @MurakamiShinyu

    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.

  5. MurakamiShinyu commented on Apr 3, 2024

    @MurakamiShinyu

    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.

  6. MurakamiShinyu commented on Apr 10, 2024

    @MurakamiShinyu

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

  7. css-meeting-bot commented on Apr 10, 2024

    @css-meeting-bot
    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
  8. fantasai commented on Apr 11, 2024

    @fantasai
    CollaboratorAuthor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions