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 property spec to align to the latest draft #1080

Closed
MurakamiShinyu opened this issue Jan 4, 2023 · 1 comment · Fixed by #1084
Closed

Update CSS text-spacing property spec to align to the latest draft #1080

MurakamiShinyu opened this issue Jan 4, 2023 · 1 comment · Fixed by #1084

Comments

@MurakamiShinyu
Copy link
Member

MurakamiShinyu commented Jan 4, 2023

Recently, the CSS text-spacing property (CSS Text Level 4) draft spec has made the following changes:

  • Add ideograph-alpha and ideograph-numeric to normal (default)
  • Do not apply ideograph-alpha/ideograph-numeric spacing to non-zero margin/border/padding
  • Use 1/8 of full-width spacing for ideograph-alpha/ideograph-numeric

We should update our CSS text-spacing implementation to align to this latest spec.


The related csswg-drafts issue (already resolved) about ideograph-alpha/ideograph-numeric spacing:

Also, there have been the following issues, already resolved or about to be resolved.

Our CSS text-spacing implementation already incorporates these proposals, i.e., the trim-end and space-first are part of text-spacing: normal. So the normal behavior becomes equivalent to space-first trim-end trim-adjacent ideograph-alpha ideograph-numeric.

We should also incorporate the last suggestion in the comment by @frivoal:

  • Modify hanging-punctuation: first to hang a paragraph-initial ideographic space as well.
@MurakamiShinyu MurakamiShinyu self-assigned this Jan 4, 2023
@MurakamiShinyu MurakamiShinyu added this to the v2.21 milestone Jan 4, 2023
MurakamiShinyu added a commit that referenced this issue Jan 5, 2023
- resolves #1080

Changes:
- Add ideograph-alpha and ideograph-numeric to normal (default)
- Do not apply ideograph-alpha/ideograph-numeric spacing to non-zero margin/border/padding
- Use 1/8 of full-width spacing for ideograph-alpha/ideograph-numeric
- Modify `hanging-punctuation: first` to hang a paragraph-initial ideographic space as well.

Tests:
- packages/core/test/files/text-spacing/text-spacing-ja.html
- packages/core/test/files/text-spacing/hanging-punctuation-first-indent-ja.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant