chore(go): 章节通用样式提到 doc.css,并修 5 处内容硬伤

- assets/doc.css 新增 .tag/.tag.s/.figure/.figcap/p.take/article>h4,14 章共用
- 01/02 删除页内 style,改用共享样式
- 04 §4.8 写屏障注释与正文补上「栈未扫完才 shade 新值」,与 §4.6 对齐
- 07 末段锚点 sec-10-9 → sec-10-10
- 06 §6.2 正文「五种」→「四种」,与标题一致
- 08 §8.1 「2014 年」→「2015 年底(Go 1.6)」
- 08 §8.4 发送路径补 panic(send on closed channel),与 §8.6 对齐
This commit is contained in:
2026-10-25 12:54:18 +08:00
parent 29a6aae4a1
commit a84ebfa8c9
7 changed files with 33 additions and 32 deletions

View File

@@ -1,4 +1,4 @@
/* ==========================================================================
/* ==========================================================================
Docker 专题 · 共用样式(与仓库内其它知识站点同一套设计变量)
通过 --brand / --accent 注入 Go 青,目录页与章节页视觉一致
========================================================================== */
@@ -201,6 +201,26 @@ pre .hl{background:color-mix(in srgb,var(--accent) 22%,transparent);border-radiu
.box.lab{background:var(--warn-bg);border-color:var(--warn-line);border-left-color:var(--warn)}
.box.lab .bt{color:var(--warn)}
/* 章节通用组件:段首标签、示意图、一句话小结
01/02 章原本把这几条写在页内 <style> 里,其余章节用不上;现统一提到共享样式表。
.tag 段首药丸标签(现象 / 机制 / 代价)
.tag.s 可跳过标记
.figure SVG 示意图容器(<figure class="figure">)
p.take 每节结尾的「一句话」小结 */
.tag{display:inline-block;font-size:12.6px;font-weight:800;letter-spacing:.5px;padding:1px 9px;margin-right:9px;
border-radius:999px;background:var(--brand-soft);color:var(--brand-ink);
border:1px solid color-mix(in srgb,var(--brand) 30%,var(--line));vertical-align:2px;white-space:nowrap}
.tag.s{background:var(--warn-bg);color:var(--warn);border-color:var(--warn-line)}
.figure{margin:22px 0 24px;padding:16px 18px 12px;border:1px solid var(--line);border-radius:13px;background:var(--soft)}
.figure svg{display:block;width:100%;height:auto;font-family:inherit}
.figcap{margin:10px 2px 0;font-size:14.8px;color:var(--muted);text-align:center;line-height:1.65}
.figcap b{color:var(--ink)}
p.take{margin:14px 0 22px;padding:9px 15px;border-left:3px solid var(--brand);border-radius:0 9px 9px 0;
background:var(--soft);color:var(--muted);font-size:16px}
p.take b{color:var(--ink)}
article > h4{font-size:16px;color:var(--brand-ink);margin:26px 0 9px;letter-spacing:.01em}
@media print{.figure{break-inside:avoid}}
/* 场景步骤编号列表 */
.steps{counter-reset:s;list-style:none;padding-left:0;margin:0 0 18px}
.steps > li{counter-increment:s;position:relative;padding-left:46px;margin-bottom:12px}