Skip to content

Enable text-autospace for CJK languages #4996

@tats-u

Description

@tats-u

Is your feature request related to a problem? Please describe.

Many documents using VitePress written in Chinese or Japanese abuse an ASCII space to add a little space between an alphanumeric and han character.

Image

↑"見つかりませんでした。" means "Not found."

However, it is wider than 0.25ic, which is recommended by clreq or jlreq, and makes it difficult for queries including such spaces to be found.
You cannot adopt this style easily without help of a textlint plugin or AutoCorrect.
This style pollutes outputs by LLMs.

Describe the solution you'd like

A CSS attribute text-autospace is available in Chromium and Safari today.
You will not need to add such ASCII spaces anymore:

Image

https://developer.mozilla.org/docs/Web/CSS/text-autospace

The current Firefox can enable text-autospace by a feature flag as opt-in, and will be supported by default since 146.

https://bugzilla.mozilla.org/show_bug.cgi?id=1981086

Image

You will not need to add a space between an alphanumeric character and a han/hiragana/katakana character for appearance sake anymore in latest browsers after several months.

Describe alternatives you've considered

Stick to this style.

Additional context

#4988 (comment) (I marked this as outdated)

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions