Re: [csswg-drafts] [css-text][text-spacing] Visual regressions of line-start at portals and news sites (#9511)

> * regardless of what we call them, just like we need both `trim-start trim-adjacent allow-end` and `trim-start trim-adjacent trim-end`, maybe we need `space-first trim-adjacent trim-end` in addition to `space-first trim-adjacent allow-end`? Even if we only pick one, I'm actually not sure which of the two matters most.

I think we don't need `space-first trim-adjacent trim-end`. The `space-first` proposal was made for compatibility with existing contents especially Japanese ebooks. The most popular ebook reader Kindle supports `space-first trim-adjacent allow-end` (with `hanging-punctuation: allow-end`) behavior implicitly. I think this setting is good enough for such Japanese contents.

> * For the choice between `trim-end` and `allow-end` together with `trim-start trim-adjacent` (and maybe with `space-first trim-adjacent`, depending on the answer to the previous question), the spec currently proposes to have an optional `allow-end` additional keyword, whose omission means `trim-end`. In the comment above, @MurakamiShinyu proposes a distinct single keyword for each possibility. I am not sure which is preferable:
>     *  `normal | space-all | trim-all | trim-start | trim-auto | space-first | space-auto‡`
>         ‡ `space-auto` is meant as a stand-in for variant of `space-first` which has the other behavior between `allow-end` and `trim-end`
>     * `normal | space-all | trim-all | trim-auto | [ space-first || allow-end ]`
>     
>     I suspect the later makes it easier to progressively open up to additional arbitrary combinations of `?-start ?-adjacent ?-end` later. Not entirely sure whether that's a good or bad thing.

I believe `normal | space-all | trim-all | trim-start | trim-auto | space-first` is preferable (`space-auto` is not necessary). While the default (normal) behavior includes `allow-end`, it is natural that the `allow-end` behavior is unchanged when only `trim-start` or `space-first` is specified.

We could treat the text-spacing-trim property as like a shorthand for setting the following individual properties:

- Start
  - Value: space-start | space-first | trim-start
  - Initial: space-start
- Between
  - Value: space-adjacent | trim-adjacent
  - Initial: trim-adjacent
- End
  - Value: space-end | allow-end | trim-end
  - Initial: allow-end
- Other
  - Value: space-other | trim-other
  - Initial: space-other

And the text-spacing-trim values would be defined as:

|               |Start      |Between       |End      |Other      |
|---------------|-----------|--------------|---------|-----------|
|**space-all**  |space-start|space-adjacent|space-end|space-other|
|**normal**     |space-start|trim-adjacent |allow-end|space-other|
|**space-first**|space-first|trim-adjacent |allow-end|space-other|
|**trim-start** |trim-start |trim-adjacent |allow-end|space-other|
|**trim-auto**  |trim-start |trim-adjacent |trim-end |space-other|
|**trim-all**   |trim-start |trim-adjacent |trim-end |trim-other |


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


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

Received on Wednesday, 20 December 2023 06:22:25 UTC