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

Update CSS text-spacing-trim property to support the latest spec change #1244

Closed
MurakamiShinyu opened this issue Dec 21, 2023 · 1 comment · Fixed by #1250
Closed

Update CSS text-spacing-trim property to support the latest spec change #1244

MurakamiShinyu opened this issue Dec 21, 2023 · 1 comment · Fixed by #1250
Assignees

Comments

@MurakamiShinyu
Copy link
Member

CSS WG decided to change the text-spacing-trim property value spec. (w3c/csswg-drafts#9511 (comment))

The CSS Working Group just discussed [css-text][text-spacing] Visual regressions of line-start at portals and news sites, and agreed to the following:

  • RESOLVED: Accept Murakami's proposal to simplify to text-spacing: normal | trim-start | space-first | trim-auto | space-all | trim-all | auto
  • RESOLVED: remap property value space for text-spacing

The accepted proposal (w3c/csswg-drafts#9511 (comment)):

I agree with the normal as the initial value which implies space-start trim-adjacent allow-end.

Other necessary text-spacing-trim values will be:

  • trim-start implies trim-start trim-adjacent allow-end
  • space-first implies space-first trim-adjacent allow-end
  • trim-auto implies trim-start trim-adjacent trim-end
  • space-all implies space-start space-adjacent space-end
  • trim-all (trim anywhere)

So the value syntax will be:

normal | trim-start | space-first | trim-auto | space-all | trim-all

Other value keywords (space-start, allow-end, etc.) and combinations are probably not necessary.

@MurakamiShinyu
Copy link
Member Author

Vivliostyleの現在の実装から変更になる点

  • デフォルトが space-first から normal (= space-start trim-adjacent allow-end) に変更。つまり:
    • 折り返し行頭約物は詰めない(以前は詰めるだった)
    • 行末約物は行に収まらないときだけ詰める(以前は常に詰めるだった)
  • 行頭側(space-first または trim-first)だけを指定したとき、行末側は allow-end の動作(行に収まらないときだけ詰める)

以前からサポートしていたキーワードとその組み合わせもサポートし続けることが可能。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant