Re: [csswg-drafts] [css-text-4] Propose 'text-spacing: space-first' (trim-start-except-first-line) as a normal behavior (#2462)

The value has been added, but the question of which of `[trim-start | space-start | space-first]` should be part of `normal` isn't settled.

Reminder: a typical Japanese paragraph starts with a 1em indent. If it starts with an opening punctuation (whose glyph is 1em wide, but only the later half contains ink), that punctuation can be:

* Hung in the 1em indent. (This is probably the most typical/desired look.)
* Set flush (trimmed by 1/2em) after the 1em indent.
* Set solid (yielding effectively a 1.5em indent) after the 1em indent.
    
In styles 1 & 2, opening punctuation wrapped to the start of a line are ideally trimmed by 1/2em in order to set them flush.

Considerations:
* The ideal behavior for CJK is probably a combination of `trim-start` (for `text-spacing`), `1ic` (for `text-indent`), and `first` (for `hanging-punctuation`). This formats the start of each paragraph as expected, when the paragraph is marked up to contain only its actual text and no indentation characters. This would suggest `trim-start` as the right initial value, but since it has not historically been implemented that would create a compat problem both on the Web and in eBooks:
  * `trim-start` breaks expectations on monospace preformatted content. We could maybe work around this with `pre { text-spacing: none; }`, but also...
  * Content authored with no consideration for typography would be improved by this, but content authored to mimic the effect of the above formatting would break.

  Because the properties needed for this to work properly haven't historically been available, typographically conscious content manages indentation by using ideographic spaces at the start of paragraphs that do not begin with (an essentially hanging) opening puctuation.
* Both `space-start` (current default) and `space-first` (Murakami-proposed default) work well with existing content that achieves the desired paragraph-start formatting by including an ideographic space in the markup for every paragraph that does not begin with an opening punctuation mark. The downside is that both these values encourage that markup practice, which gets in the way of `text-indent` and `hanging-punctuation` being able to control paragraph formatting.
* Between these two, `space-first` is a strict improvement: while it plays equally well with legacy content, and equally encourages problematic markup practices, it does have the advantage of avoiding the appearance of a paragraph start if a wrapped line happens to start with an opening punctuation.

I think my recommendation would be to:
1. Adopt `space-first` as the default behavior for normal, and
2. Modify `hanging-punctuation: first` to hang a paragraph-initial ideographic space as well.

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


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

Received on Friday, 30 December 2022 02:36:24 UTC