Re: [csswg-drafts] [css-text-4] The `text-spacing: auto` behavior should be made more predictable (#9857)

I noticed that the upcoming Chrome release will support the `text-spacing-trim` property but not support the `auto` value. The chromium issue https://issues.chromium.org/issues/40275400#comment64 says:

> [text-spacing-trim] Enable for stable

> Supported values: normal, trim-start, space-all, space-first

I understand that implementors implement only a subset of the spec at first, possibly dropping `trim-auto` because less necessary if `trim-start` which is nearly the same is supported (the difference only appears in justified text, which is subtle). But it's a pity that the `auto` value is not supported. I think the `auto` should be the same as `trim-start` if `trim-auto` is not supported.

WebKit seems to implement the value `auto` first. The WebKit Bugzilla https://bugs.webkit.org/show_bug.cgi?id=252068 says:

> Implement a parser with longhands support for:
> text-spacing: auto | none | \<text-autospace> || \<text-spacing-trim>
>
> text-autospace: auto | no-autospace
> text-spacing-trim: auto | space-all
>
> We can then iterate from here adding support for 'normal' in the shorthand and for the remaining values in the longhands.

If WebKit supports `auto` but not `trim-auto` and `trim-start` while Chromium supports `trim-start` but not `auto` and `trim-auto`, (and Firefox may support another subset), it will be difficult for authors to decide which value to use when they want typographically better setting than `normal`. It will be too bad if authors have to write multiple `text-spacing-trim` properties for different UAs, e.g.:

```css
html {
  text-spacing-trim: trim-start; /* for Chromium */
  text-spacing-trim: auto;       /* for WebKit   */
  text-spacing-trim: trim-auto;  /* for other    */
}
```

I am not opposed to the `auto` value being UA-dependent typographically high quality settings, but I think it is better to have descriptions (maybe as a note) of recommended settings so that implementors can implement it, and authors can use it with confidence. The recommended settings will be like:

- The `auto` value of `text-spacing-trim` should be the same as `trim-auto` (or `trim-start` if `trim-auto` is not supported), or typographically higher quality settings defined by UA/platform.

- The `auto` value of `text-autospace` should be the same as `ideograph-alpha ideograph-numeric punctuation` (or `ideograph-alpha ideograph-numeric` if `punctuation` is not supported) or typographically higher quality settings defined by UA/platform.

What are the implementers' opinions?
@kojiishi, @litherum, @masayuki-nakano ?


-- 
GitHub Notification of comment by MurakamiShinyu
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9857#issuecomment-1964408831 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 26 February 2024 15:23:14 UTC