w3c / w3c/clreq

Spacing between ideographs and non-fullwidth punctuation/symbols

Open
#559 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

i:spacing
Dominant language
HTML
Stars
809
Forks
66
Avg merge
19m
Merged PRs (30d)
1

Description

https://www.w3.org/International/clreq/#mixed_text_composition_in_horizontal_writing_mode

原则上,汉字与西文字母、数字间使用不多于四分之一个汉字宽的字距或空白。

很多时候会出现汉字与非全角符号相邻的情况,举例如下。

个人认为应该添加空白的情况:

input[type="text"]选择器将选择所有type属性为textinput元素。

(右方括号和右边的汉字的字距)

在HTML中按语言修改样式的最佳方法是使用CSS的:lang()选择器。

(冒号和括号和两边汉字的字距)

C#是微软公司发布的一种由C和C++衍生出来的面向对象的编程语言,运行于.NET Framework和.NET Core之上。

使用!important是一个坏习惯,应该尽量避免。

我们可以用@font-face来指定自定义字体。

可选链?.是一种访问嵌套对象属性的安全的方式。即使中间的属性不存在,也不会出现错误。

符号^和符号$在正则表达式中具有特殊的含义。

正则表达式中的\b表示词边界。

#+.!@?^$\等符号和汉字的字距)

42%代表百分之四十二,1‰代表千分之一,|a|=2代表a的实际值是±2

{1,2}{1,2,3}的子集。

(数学符号和汉字的字距)

另外,像*这样的脚注标记不应该和汉字之间有空白。非全角的分隔号(/)和汉字之间也不应该有空白。

文档中目前没有提到这些情况。

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked W3C CLREQ section on mixed text composition in horizontal writing mode, then locate the corresponding spacing guidance in the repository documentation. Document spacing behavior between ideographs and non-fullwidth punctuation or mathematical symbols, including the listed footnote and slash exceptions. Done means these cases and exceptions are covered clearly.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, html
Domain
documentation, internationalization
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.