2026-10-24 01:03:36 +08:00
|
|
|
|
/*!
|
|
|
|
|
|
* 评论区样式
|
|
|
|
|
|
* Yongquan Yang <yangyq.net>
|
|
|
|
|
|
*
|
2026-10-24 12:16:30 +08:00
|
|
|
|
* ── 3.2.20:为什么又改了一次 ────────────────────────────────
|
|
|
|
|
|
* 3.2.18 重写解决的是**结构**问题(float 撑破、嵌套没缩进、
|
|
|
|
|
|
* 头像基线不齐)。3.2.19 解决的是**数据**问题(评论一条不显示)。
|
|
|
|
|
|
* 这一版解决的是**观感**问题 —— 用无头浏览器把计算样式量出来
|
|
|
|
|
|
* 之后,量到的三条都是硬指标不达标,不是"见仁见智":
|
2026-10-24 01:03:36 +08:00
|
|
|
|
*
|
2026-10-24 12:16:30 +08:00
|
|
|
|
* · 时间戳 #a4abb5 → 对白底对比度 **2.32**(WCAG AA 正文要 ≥4.5)
|
|
|
|
|
|
* · 「回复」按钮 #8a9099 → 对比度 **3.22**(可点元素同样要 ≥4.5)
|
|
|
|
|
|
* · 顶层评论分隔线 #f5f6f8 → 对白底几乎零差,等于**没有分隔**
|
|
|
|
|
|
*
|
|
|
|
|
|
* 也就是说"不好看"里有一半其实是"看不清"。只调审美不改这三条,
|
|
|
|
|
|
* 换个分辨率又会打回原形。所以这一版先把可读性拉到达标,
|
|
|
|
|
|
* 再谈层次与细节。
|
|
|
|
|
|
*
|
|
|
|
|
|
* ── 设计取向:跟整站对齐,不做另一套语言 ─────────────────────
|
|
|
|
|
|
* 量过整站的实际 token:body 16px / 行高 1.8 / 正文 #212529、
|
|
|
|
|
|
* 底色 #f5f5f5、圆角以 3px 为主、主色 #00a2ff、卡片靠 1px 淡阴影
|
|
|
|
|
|
* 而不是大圆角大投影。评论区是这张白卡里的**内嵌区**,
|
|
|
|
|
|
* 所以这里不引入流行的"大圆角 + 重投影 + 彩色卡片",
|
|
|
|
|
|
* 而是把预算花在:分隔清晰、层级明确、元信息可读、交互有反馈。
|
|
|
|
|
|
*
|
|
|
|
|
|
* 参考的设计原则(GitHub Discussions / Discourse / 主流中文博客):
|
|
|
|
|
|
* 1. 元信息(时间、操作)比正文弱但**必须可读**,不能淡到消失;
|
|
|
|
|
|
* 2. 层级靠"缩进 + 引导线 + 头像尺寸"三重冗余表达,
|
|
|
|
|
|
* 任何一重失效(窄屏、深嵌套)另外两重还在;
|
|
|
|
|
|
* 3. 分隔线只用在"同层"之间,跨层交给缩进 —— 两套信号不要打架;
|
|
|
|
|
|
* 4. 可点元素必须有 hover / focus 的可见变化,不能只变鼠标指针。
|
|
|
|
|
|
*
|
|
|
|
|
|
* ── 三条不能动的约束(改样式前务必知道)───────────────────────
|
|
|
|
|
|
* 1. `.yang-comment` **必须是 grid**,且 `grid-template-columns` 为
|
|
|
|
|
|
* `auto minmax(0,1fr)`、子容器 `grid-column: 1 / -1`。
|
|
|
|
|
|
* 原因:`<ol class="yang-children">` 是 `<li>` 的**直接子元素**,
|
|
|
|
|
|
* 换成 flex 它会成为第三个 flex 项被排到右侧(详见第 3 节注释)。
|
|
|
|
|
|
* 2. 子容器 `ol.yang-children` 的 **左偏移必须 ≈0、宽度必须 ≈父宽**。
|
|
|
|
|
|
* `_diag318_children_geo.js` 的判据 A/B 卡的就是这两条,
|
|
|
|
|
|
* 所以缩进只能加在 `padding-left` 上,**不能加 margin-left**。
|
|
|
|
|
|
* 3. 头像宽度按断点递减:>768 是 42、≤768 是 36、≤400 是 32。
|
|
|
|
|
|
* `_comments_geometry.js` 按这三个值断言,改尺寸要同步改探针。
|
2026-10-24 01:03:36 +08:00
|
|
|
|
*/
|
|
|
|
|
|
|
2026-10-24 12:16:30 +08:00
|
|
|
|
/*--------------------------------------------------------------
|
|
|
|
|
|
0. 局部设计变量
|
|
|
|
|
|
--------------------------------------------------------------*/
|
|
|
|
|
|
|
|
|
|
|
|
/* 变量全部挂在 `.comments` 作用域内,不污染全站。
|
|
|
|
|
|
*
|
|
|
|
|
|
* 使用约定:**信息性颜色一律带兜底值**(`var(--x, #hex)`),
|
|
|
|
|
|
* 因为评论表单会被 JS 搬进某条评论的 `.yang-children` 里 ——
|
|
|
|
|
|
* 虽然它仍在 `.comments` 内部、继承链没断,但只要将来有人把
|
|
|
|
|
|
* 表单挪到容器外,没有兜底的 var() 就会退化成 initial 的黑色。
|
|
|
|
|
|
* 纯装饰性的取值(圆角、缓动曲线)允许不带兜底:真取不到也
|
|
|
|
|
|
* 只是少了点润色,不会把文字变成看不见的颜色。
|
|
|
|
|
|
*
|
|
|
|
|
|
* 下面注释里的「对比度」是相对白底 #fff 按 WCAG 2.x 算的实测值。 */
|
|
|
|
|
|
.comments {
|
|
|
|
|
|
--yq-primary: #00a2ff;
|
|
|
|
|
|
--yq-primary-dark: #0089db;
|
|
|
|
|
|
--yq-primary-soft: #eaf6ff;
|
|
|
|
|
|
|
|
|
|
|
|
/* 文字三级:正文 / 次要 / 弱
|
|
|
|
|
|
* --yq-text 10.9 —— 正文
|
|
|
|
|
|
* --yq-text-2 6.0 —— 作者名、操作按钮
|
|
|
|
|
|
* --yq-text-3 4.8 —— 时间、辅助说明(AA 下限 4.5,留了余量) */
|
|
|
|
|
|
--yq-text: #33383f;
|
|
|
|
|
|
--yq-text-2: #5b6470;
|
|
|
|
|
|
--yq-text-3: #6b7280;
|
|
|
|
|
|
|
|
|
|
|
|
/* 线:把"分隔"和"装饰"分开,不要用一个 #f0f0f0 打天下 */
|
|
|
|
|
|
--yq-line: #eaedf2; /* 结构性分隔,看得见 */
|
|
|
|
|
|
--yq-line-soft: #f1f4f8; /* 同层细分隔 */
|
|
|
|
|
|
--yq-guide: #dbe6f2; /* 嵌套引导线 */
|
|
|
|
|
|
|
|
|
|
|
|
--yq-bg-soft: #f7f9fb;
|
|
|
|
|
|
--yq-bg-input: #fcfcfd;
|
|
|
|
|
|
|
|
|
|
|
|
--yq-radius: 4px;
|
|
|
|
|
|
--yq-radius-lg: 6px;
|
|
|
|
|
|
|
|
|
|
|
|
/* 统一动效曲线:进出都用同一条,避免"有的滑有的弹" */
|
|
|
|
|
|
--yq-ease: cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-24 01:03:36 +08:00
|
|
|
|
/*--------------------------------------------------------------
|
|
|
|
|
|
1. 区块与标题
|
|
|
|
|
|
--------------------------------------------------------------*/
|
|
|
|
|
|
|
|
|
|
|
|
.k-main .details .comments {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
margin-top: 20px;
|
|
|
|
|
|
padding: 22px 24px 24px;
|
|
|
|
|
|
border-radius: var(--yq-radius-lg, 6px);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
background-color: #fff;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
/* 比原来的 0 1px 3px 稍微收一点:整站卡片(.widget)用的是
|
|
|
|
|
|
0 1px 2px,评论区跟着走,深浅一致才不会显得"飘" */
|
|
|
|
|
|
box-shadow: 0 1px 2px rgba(31, 35, 40, 0.08);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.k-main .details .post-2 .comments {
|
|
|
|
|
|
box-shadow: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comments-head {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: baseline;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
gap: 12px;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
padding-bottom: 15px;
|
|
|
|
|
|
border-bottom: 1px solid var(--yq-line, #eaedf2);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-24 12:16:30 +08:00
|
|
|
|
/* 标题左侧加一条主色短竖条:中文博客里很常见,成本极低,
|
|
|
|
|
|
但它让"这是评论区"在长页面滚动时有一眼可辨的锚点。 */
|
2026-10-24 01:03:36 +08:00
|
|
|
|
.comments-head .title {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
position: relative;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
margin: 0;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
padding-left: 12px;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
color: #1f2328;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
font-size: 19px;
|
|
|
|
|
|
line-height: 1.4;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
letter-spacing: -0.005em;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-24 12:16:30 +08:00
|
|
|
|
.comments-head .title::before {
|
|
|
|
|
|
content: "";
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
top: 50%;
|
|
|
|
|
|
width: 3px;
|
|
|
|
|
|
height: 16px;
|
|
|
|
|
|
margin-top: -8px;
|
|
|
|
|
|
border-radius: 2px;
|
|
|
|
|
|
background-color: var(--yq-primary, #00a2ff);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 「写下你的评论」:原来用 3px 圆角 + #f4f8ff 底,白底上几乎看不出是按钮。
|
|
|
|
|
|
* 改成描边式,hover 时反色 —— 可点性更明确,又不抢标题的注意力。 */
|
2026-10-24 01:03:36 +08:00
|
|
|
|
.comments-jump-form {
|
|
|
|
|
|
flex: 0 0 auto;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
padding: 6px 14px;
|
|
|
|
|
|
border: 1px solid #cfe6fb;
|
|
|
|
|
|
border-radius: var(--yq-radius, 4px);
|
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
|
color: var(--yq-primary-dark, #0089db);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
font-size: 13px;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
line-height: 1.4;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
text-decoration: none;
|
|
|
|
|
|
white-space: nowrap;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
transition: background-color 0.16s var(--yq-ease), border-color 0.16s var(--yq-ease),
|
|
|
|
|
|
color 0.16s var(--yq-ease);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comments-jump-form:hover {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
border-color: var(--yq-primary, #00a2ff);
|
|
|
|
|
|
background-color: var(--yq-primary, #00a2ff);
|
|
|
|
|
|
color: #fff;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
text-decoration: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-24 12:16:30 +08:00
|
|
|
|
.comments-jump-form:focus-visible {
|
|
|
|
|
|
outline: 2px solid var(--yq-primary, #00a2ff);
|
|
|
|
|
|
outline-offset: 2px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-24 01:03:36 +08:00
|
|
|
|
.comments-closed,
|
|
|
|
|
|
.comments-empty {
|
|
|
|
|
|
margin: 20px 0 4px;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
padding: 18px 16px;
|
|
|
|
|
|
border: 1px dashed #dfe5ec;
|
|
|
|
|
|
border-radius: var(--yq-radius, 4px);
|
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
|
color: var(--yq-text-3, #6b7280);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
font-size: 13.5px;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
line-height: 1.7;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
text-align: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------
|
|
|
|
|
|
2. 评论列表
|
|
|
|
|
|
--------------------------------------------------------------*/
|
|
|
|
|
|
|
|
|
|
|
|
.yang-comment-list,
|
|
|
|
|
|
.yang-children {
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
list-style: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.yang-comment-list {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
margin-top: 2px;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-24 12:16:30 +08:00
|
|
|
|
/* 顶层评论之间用**看得见**的分隔线。
|
|
|
|
|
|
* 原来是 #f5f6f8 —— 对白底几乎零差(正文区宽度 780px 的一条线,
|
|
|
|
|
|
* 差值小于 4 级灰阶,人眼在普通屏幕上抓不到),
|
|
|
|
|
|
* 于是四条评论糊成一坨。现在提到 #eaedf2,是"能看见但不抢戏"的程度。
|
|
|
|
|
|
* 跨层之间不加线,交给缩进和引导线表达 —— 两套信号不要打架。 */
|
2026-10-24 01:03:36 +08:00
|
|
|
|
.yang-comment-list > .yang-comment {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
border-bottom: 1px solid var(--yq-line, #eaedf2);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.yang-comment-list > .yang-comment:last-child {
|
|
|
|
|
|
border-bottom: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------
|
|
|
|
|
|
3. 单条评论
|
|
|
|
|
|
--------------------------------------------------------------*/
|
|
|
|
|
|
|
|
|
|
|
|
/* 单条评论的布局:头像列 + 主体列
|
|
|
|
|
|
*
|
|
|
|
|
|
* ⚠️ 这里**必须是 grid,不能是 flex**。
|
|
|
|
|
|
* 原因:wp_list_comments 输出的是
|
|
|
|
|
|
* <li class="yang-comment">
|
|
|
|
|
|
* <div class="yang-comment-avatar">…</div>
|
|
|
|
|
|
* <div class="yang-comment-main">…</div>
|
|
|
|
|
|
* <ol class="yang-children">…子评论…</ol> ← 也是 li 的直接子元素
|
|
|
|
|
|
* </li>
|
|
|
|
|
|
* 若 li 用 display:flex,那个 <ol> 就成了**第三个 flex 项**,
|
|
|
|
|
|
* 被排到主体右边的同一行里 —— 表现为"子评论跑到父评论右侧"、
|
|
|
|
|
|
* 父评论正文被挤成一条、页面出现横向溢出。这是真实渲染量出来的,
|
|
|
|
|
|
* 光看代码几乎想不到(flex 项的位置不体现在 li 自己的属性上)。
|
|
|
|
|
|
*
|
|
|
|
|
|
* grid 用两列:第 1 列 auto(由头像定宽),第 2 列 minmax(0,1fr)
|
|
|
|
|
|
* (minmax 的下界 0 是关键,否则长英文/长 URL 会把列撑宽)。
|
|
|
|
|
|
* 子评论用 grid-column: 1 / -1 独占下一整行。 */
|
|
|
|
|
|
.yang-comment {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
grid-template-columns: auto minmax(0, 1fr);
|
2026-10-24 12:16:30 +08:00
|
|
|
|
column-gap: 13px;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
align-items: start;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
padding: 18px 0;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
list-style: none;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
/* 从通知邮件/后台点进来时会带 #comment-123 锚点,
|
|
|
|
|
|
这里不做布局级高亮(会挤动内容),只给正文区一个色块,
|
|
|
|
|
|
详见第 5 节末尾的 :target 规则。 */
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 子评论容器独占整行,排在头像与主体下方 */
|
|
|
|
|
|
.yang-comment > .yang-children {
|
|
|
|
|
|
grid-column: 1 / -1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-24 12:16:30 +08:00
|
|
|
|
/* 头像列:固定宽度,不参与伸缩 —— 否则长评论把它挤扁。
|
|
|
|
|
|
* (grid 里 flex 属性无效,留着只是无害的历史残留,已删除。) */
|
2026-10-24 01:03:36 +08:00
|
|
|
|
.yang-comment-avatar {
|
|
|
|
|
|
width: 42px;
|
|
|
|
|
|
line-height: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-24 12:16:30 +08:00
|
|
|
|
/* 头像:去掉 1px 实线边框,改用 box-shadow 做一圈极淡描边。
|
|
|
|
|
|
* 理由有两个:① 实线边框在 42px 圆上是"切边"观感,阴影更柔;
|
|
|
|
|
|
* ② box-shadow 不占布局,直径仍然是精确的 42px ——
|
|
|
|
|
|
* 几何探针按 42/36/32 断言,改 border 不会让断言漂移。 */
|
2026-10-24 01:03:36 +08:00
|
|
|
|
.yang-comment-avatar img,
|
|
|
|
|
|
.yang-comment-avatar-img {
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
width: 42px;
|
|
|
|
|
|
height: 42px;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
border: 0;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
object-fit: cover;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
background-color: #f2f4f7;
|
|
|
|
|
|
box-shadow: 0 0 0 1px rgba(31, 35, 40, 0.07), 0 1px 2px rgba(31, 35, 40, 0.06);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 没有头像时的首字占位 */
|
|
|
|
|
|
.yang-comment-avatar-ph {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
width: 42px;
|
|
|
|
|
|
height: 42px;
|
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
background-color: #eef2f7;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
box-shadow: 0 0 0 1px rgba(31, 35, 40, 0.05);
|
|
|
|
|
|
color: #66727f;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
font-size: 17px;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
line-height: 1;
|
|
|
|
|
|
text-transform: uppercase;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
user-select: none;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 主体列 */
|
|
|
|
|
|
.yang-comment-main {
|
|
|
|
|
|
min-width: 0; /* 关键:让内部的 text-overflow / 换行能生效 */
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.yang-comment-head {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: baseline;
|
|
|
|
|
|
flex-wrap: wrap;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
gap: 6px;
|
|
|
|
|
|
margin-bottom: 5px;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.yang-comment-author {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
color: #1f2328;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
font-style: normal;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
font-size: 14.5px;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
line-height: 1.5;
|
|
|
|
|
|
/* 超长昵称截断,别把时间挤到下一行去 */
|
|
|
|
|
|
max-width: 100%;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.yang-comment-author a {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
color: inherit;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
text-decoration: none;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
transition: color 0.16s var(--yq-ease);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.yang-comment-author a:hover {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
color: var(--yq-primary-dark, #0089db);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-24 12:16:30 +08:00
|
|
|
|
/* 时间:**这是本版最实质的一处修复**。
|
|
|
|
|
|
* 原来是 #a4abb5,对白底只有 2.32 —— 2.32 是什么概念:
|
|
|
|
|
|
* WCAG 把 3.0 定为"大字最低可读",2.32 连这个都不到,
|
|
|
|
|
|
* 相当于把时间写成了水印。现在用 #6b7280(对比度 4.83),
|
|
|
|
|
|
* 仍然明显弱于正文 #33383f(对比度 10.9),但它读得清。 */
|
2026-10-24 01:03:36 +08:00
|
|
|
|
.yang-comment-time {
|
|
|
|
|
|
flex: 0 0 auto;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
color: var(--yq-text-3, #6b7280);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
font-size: 12.5px;
|
|
|
|
|
|
line-height: 1.5;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
/* 等宽数字:多条评论的时间上下对齐,不会因为 1 和 8 的宽度差抖动 */
|
|
|
|
|
|
font-variant-numeric: tabular-nums;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-24 12:16:30 +08:00
|
|
|
|
/* 作者名与时间之间的小间隔点。
|
|
|
|
|
|
* 用 ::before 而不是真加一个字符:它会跟着 time 一起换行,
|
|
|
|
|
|
* 不会孤零零留在行首。 */
|
|
|
|
|
|
.yang-comment-time::before {
|
|
|
|
|
|
content: "·";
|
|
|
|
|
|
margin-right: 6px;
|
|
|
|
|
|
color: #c9ced6;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 徽标:作者 / 待审核。3px 圆角改成 pill —— 徽标本身足够短,
|
|
|
|
|
|
* pill 不会显得幼稚,反而和头像的圆形呼应。 */
|
2026-10-24 01:03:36 +08:00
|
|
|
|
.yang-comment-badge {
|
|
|
|
|
|
flex: 0 0 auto;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
padding: 1px 8px;
|
|
|
|
|
|
border-radius: 999px;
|
|
|
|
|
|
background-color: var(--yq-primary-soft, #eaf6ff);
|
|
|
|
|
|
color: var(--yq-primary-dark, #0089db);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
font-size: 11.5px;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
line-height: 1.6;
|
|
|
|
|
|
letter-spacing: 0.01em;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.yang-comment-badge.is-pending {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
background-color: #fff5e0;
|
|
|
|
|
|
color: #96601a;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-24 12:16:30 +08:00
|
|
|
|
/* 待审核的整条评论淡化,一眼区分。
|
|
|
|
|
|
* 0.72 太狠 —— 配上本来就淡的时间,整条几乎消失。收到 0.85。 */
|
2026-10-24 01:03:36 +08:00
|
|
|
|
.yang-comment.is-pending .yang-comment-content {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
opacity: 0.85;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 评论正文 */
|
|
|
|
|
|
.yang-comment-content {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
color: var(--yq-text, #33383f);
|
|
|
|
|
|
font-size: 14.5px;
|
|
|
|
|
|
/* 1.8 是中文长文段的舒适值;原来 1.78 也可以,
|
|
|
|
|
|
但配合 14.5px 的字号,1.8 让行距守恒在 26px 左右,更像印刷品 */
|
|
|
|
|
|
line-height: 1.8;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
word-wrap: break-word;
|
|
|
|
|
|
overflow-wrap: break-word;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.yang-comment-content > p:first-child {
|
|
|
|
|
|
margin-top: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.yang-comment-content > p:last-child {
|
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.yang-comment-content p {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
margin: 0 0 10px;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* @某人 的提及高亮(由 comment_add_at 过滤器插入的 <span>) */
|
|
|
|
|
|
.yang-comment-content > span:first-child {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
color: var(--yq-primary-dark, #0089db);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 评论里的图片:限制最大宽度,别撑破容器 */
|
|
|
|
|
|
.yang-comment-content img {
|
|
|
|
|
|
max-width: 100%;
|
|
|
|
|
|
height: auto;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 引用块 */
|
|
|
|
|
|
.yang-comment-content blockquote {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
margin: 10px 0;
|
|
|
|
|
|
padding: 8px 14px;
|
|
|
|
|
|
border-left: 3px solid #cfe4f8;
|
|
|
|
|
|
border-radius: 0 var(--yq-radius, 4px) var(--yq-radius, 4px) 0;
|
|
|
|
|
|
background-color: var(--yq-bg-soft, #f7f9fb);
|
|
|
|
|
|
color: var(--yq-text-2, #5b6470);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
font-size: 13.5px;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
line-height: 1.75;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.yang-comment-content blockquote > p:last-child {
|
|
|
|
|
|
margin-bottom: 0;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.yang-comment-content code {
|
|
|
|
|
|
padding: 1px 5px;
|
|
|
|
|
|
border-radius: 3px;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
background-color: #f2f4f7;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
color: #c7254e;
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.yang-comment-content pre {
|
|
|
|
|
|
overflow-x: auto;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
margin: 10px 0;
|
|
|
|
|
|
padding: 11px 14px;
|
|
|
|
|
|
border-radius: var(--yq-radius, 4px);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
background-color: #f6f7f9;
|
|
|
|
|
|
font-size: 13px;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
line-height: 1.65;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.yang-comment-content pre code {
|
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
background: none;
|
|
|
|
|
|
color: inherit;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 表情图片与正文基线对齐 */
|
|
|
|
|
|
.yang-comment-content img.wp-smiley {
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
margin: 0 1px;
|
|
|
|
|
|
width: auto;
|
|
|
|
|
|
max-height: 1.4em;
|
|
|
|
|
|
vertical-align: text-bottom;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------
|
|
|
|
|
|
4. 操作按钮
|
|
|
|
|
|
--------------------------------------------------------------*/
|
|
|
|
|
|
|
|
|
|
|
|
.yang-comment-actions {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
gap: 6px;
|
|
|
|
|
|
/* 正文下留一点呼吸;按钮自带内边距,这里就得收一点 */
|
|
|
|
|
|
margin-top: 5px;
|
|
|
|
|
|
margin-left: -9px; /* 抵消按钮的 padding-left,让图标与正文左边缘对齐 */
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-24 12:16:30 +08:00
|
|
|
|
/* 「回复」「编辑」:**第二处硬指标修复**。
|
|
|
|
|
|
* 原来是 #8a9099(对比度 3.22)且没有任何边距,
|
|
|
|
|
|
* 在正文下面像一行灰字,不像按钮。
|
|
|
|
|
|
* 现在:颜色提到 #5b6470(6.0),加内边距形成可点区域,
|
|
|
|
|
|
* hover 时出现浅蓝底 —— 三重信号告诉人"这是能点的"。 */
|
2026-10-24 01:03:36 +08:00
|
|
|
|
.yang-comment-reply,
|
|
|
|
|
|
.yang-comment-edit {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
padding: 3px 9px;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
border: 0;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
border-radius: var(--yq-radius, 4px);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
background: none;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
color: var(--yq-text-2, #5b6470);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
font-size: 13px;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
font-weight: 500;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
line-height: 1.6;
|
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
|
cursor: pointer;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
transition: color 0.16s var(--yq-ease), background-color 0.16s var(--yq-ease);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.yang-comment-reply:hover,
|
|
|
|
|
|
.yang-comment-edit:hover {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
background-color: var(--yq-primary-soft, #eaf6ff);
|
|
|
|
|
|
color: var(--yq-primary-dark, #0089db);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
text-decoration: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-24 12:16:30 +08:00
|
|
|
|
.yang-comment-reply:focus-visible,
|
|
|
|
|
|
.yang-comment-edit:focus-visible {
|
|
|
|
|
|
outline: 2px solid var(--yq-primary, #00a2ff);
|
|
|
|
|
|
outline-offset: 1px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-24 01:03:36 +08:00
|
|
|
|
.yang-comment-reply .kicon {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
margin-right: 4px;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
font-size: 12px;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
/* 图标跟文字同色,不要一个深一个浅 */
|
|
|
|
|
|
color: inherit;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 已进入"回复这条"状态时,按钮藏起来(由 JS 加 class) */
|
|
|
|
|
|
.yang-comment-reply.is-hidden {
|
|
|
|
|
|
visibility: hidden;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------
|
|
|
|
|
|
5. 嵌套回复
|
|
|
|
|
|
--------------------------------------------------------------*/
|
|
|
|
|
|
|
2026-10-24 12:16:30 +08:00
|
|
|
|
/* 层级用三重冗余表达,任何一重失效另外两重仍在:
|
|
|
|
|
|
* ① 缩进(padding-left)
|
|
|
|
|
|
* ② 引导线(border-left)
|
|
|
|
|
|
* ③ 头像尺寸(42 → 34)
|
|
|
|
|
|
*
|
|
|
|
|
|
* 引导线原来用 #f0f2f5 —— 和白底差 5 级灰阶,基本看不见,
|
|
|
|
|
|
* 于是"缩进 20px 但没有任何归属提示",三层以上完全看不出谁回谁。
|
|
|
|
|
|
* 现在提到 #dbe6f2(带一点主色倾向),既看得见又不刺眼。
|
|
|
|
|
|
*
|
|
|
|
|
|
* ⚠️ 缩进只能用 padding-left,**不能用 margin-left**:
|
|
|
|
|
|
* `_diag318_children_geo.js` 判据 A 要求 `ol.yang-children` 的
|
|
|
|
|
|
* 左偏移(相对父 li)≤4px、判据 B 要求宽度 ≥ 父宽 90%。
|
|
|
|
|
|
* margin-left 会同时破坏这两条,padding-left 不会。 */
|
2026-10-24 01:03:36 +08:00
|
|
|
|
.yang-children {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
margin-top: 4px;
|
|
|
|
|
|
padding-left: 18px;
|
|
|
|
|
|
border-left: 2px solid var(--yq-guide, #dbe6f2);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.yang-children > .yang-comment {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
padding: 12px 0;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-24 12:16:30 +08:00
|
|
|
|
/* 同一层回复之间:比顶层更细的分隔,且只在"多于一条"时才需要。
|
|
|
|
|
|
* 用 :not(:last-child) 而不是给最后一条清零 —— 后者会因为
|
|
|
|
|
|
* 嵌套结构不同而漏掉某些情况。 */
|
|
|
|
|
|
.yang-children > .yang-comment:not(:last-child) {
|
|
|
|
|
|
border-bottom: 1px solid var(--yq-line-soft, #f1f4f8);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 深层的头像小一号,靠尺寸建立层级感(第二重冗余) */
|
2026-10-24 01:03:36 +08:00
|
|
|
|
.yang-children .yang-children .yang-comment-avatar,
|
|
|
|
|
|
.yang-children .yang-children .yang-comment-avatar-ph {
|
|
|
|
|
|
width: 34px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-24 12:16:30 +08:00
|
|
|
|
.yang-children .yang-children .yang-comment-avatar img,
|
|
|
|
|
|
.yang-children .yang-children .yang-comment-avatar-img {
|
2026-10-24 01:03:36 +08:00
|
|
|
|
width: 34px;
|
|
|
|
|
|
height: 34px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.yang-children .yang-children .yang-comment-avatar-ph {
|
|
|
|
|
|
height: 34px;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-24 12:16:30 +08:00
|
|
|
|
/* 第三层以后不再继续缩进 —— 否则窄屏上正文只剩一条竖线。
|
|
|
|
|
|
* 引导线也去掉:三条竖线叠在一起会变成"表格"观感。 */
|
2026-10-24 01:03:36 +08:00
|
|
|
|
.yang-children .yang-children .yang-children {
|
|
|
|
|
|
padding-left: 8px;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
border-left-color: #e6edf5;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 新提交的评论:淡入 + 短暂底色,让用户看到自己刚发的那条 */
|
|
|
|
|
|
@keyframes yang-comment-in {
|
|
|
|
|
|
from {
|
|
|
|
|
|
opacity: 0;
|
|
|
|
|
|
transform: translateY(-4px);
|
|
|
|
|
|
}
|
|
|
|
|
|
to {
|
|
|
|
|
|
opacity: 1;
|
|
|
|
|
|
transform: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.yang-comment.is-new {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
animation: yang-comment-in 0.28s var(--yq-ease);
|
|
|
|
|
|
border-radius: var(--yq-radius-lg, 6px);
|
|
|
|
|
|
background-color: #fffdf4;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 从通知/后台带 #comment-123 跳过来时,高亮那一条。
|
|
|
|
|
|
* 只在正文区上色,不动布局宽度 —— 用整条 li 加内边距的话,
|
|
|
|
|
|
* 页面会在跳转瞬间"抖一下",比不高亮更难受。 */
|
|
|
|
|
|
.yang-comment:target .yang-comment-content {
|
|
|
|
|
|
border-radius: var(--yq-radius, 4px);
|
|
|
|
|
|
background-color: #fffbe8;
|
|
|
|
|
|
box-shadow: 0 0 0 8px #fffbe8;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------
|
|
|
|
|
|
6. 加载更多
|
|
|
|
|
|
--------------------------------------------------------------*/
|
|
|
|
|
|
|
|
|
|
|
|
.comments-more {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
padding: 18px 0 2px;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
text-align: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comments-more[hidden] {
|
|
|
|
|
|
display: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comments-more-btn {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
padding: 9px 28px;
|
|
|
|
|
|
border: 1px solid #dbe3ec;
|
|
|
|
|
|
border-radius: 999px;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
background-color: #fff;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
color: var(--yq-text-2, #5b6470);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
font-size: 13.5px;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
font-weight: 500;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
cursor: pointer;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
transition: border-color 0.16s var(--yq-ease), color 0.16s var(--yq-ease),
|
|
|
|
|
|
background-color 0.16s var(--yq-ease);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comments-more-btn:hover:not(:disabled) {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
border-color: var(--yq-primary, #00a2ff);
|
|
|
|
|
|
background-color: var(--yq-primary-soft, #eaf6ff);
|
|
|
|
|
|
color: var(--yq-primary-dark, #0089db);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comments-more-btn:focus-visible {
|
|
|
|
|
|
outline: 2px solid var(--yq-primary, #00a2ff);
|
|
|
|
|
|
outline-offset: 2px;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comments-more-btn:disabled {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
opacity: 0.55;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
cursor: default;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------
|
|
|
|
|
|
7. 评论表单
|
|
|
|
|
|
--------------------------------------------------------------*/
|
|
|
|
|
|
|
|
|
|
|
|
.comment-respond {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
margin-top: 24px;
|
|
|
|
|
|
padding-top: 22px;
|
|
|
|
|
|
border-top: 1px solid var(--yq-line, #eaedf2);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 表单被"搬"进某条评论时,去掉那条顶部分隔线,视觉上更连贯 */
|
|
|
|
|
|
.yang-children > #respond {
|
|
|
|
|
|
margin-top: 10px;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
padding-top: 14px;
|
|
|
|
|
|
border-top: 1px dashed #e3e9f1;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-reply-title {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
gap: 10px;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
margin: 0 0 15px;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
color: #1f2328;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
|
line-height: 1.5;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-cancel-reply {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
padding: 3px 11px;
|
|
|
|
|
|
border: 1px solid #e2e7ee;
|
|
|
|
|
|
border-radius: 999px;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
background-color: #f7f8fa;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
color: var(--yq-text-2, #5b6470);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
font-weight: 400;
|
|
|
|
|
|
font-size: 12.5px;
|
|
|
|
|
|
cursor: pointer;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
transition: border-color 0.16s var(--yq-ease), background-color 0.16s var(--yq-ease),
|
|
|
|
|
|
color 0.16s var(--yq-ease);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-cancel-reply[hidden] {
|
|
|
|
|
|
display: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-cancel-reply:hover {
|
|
|
|
|
|
border-color: #f0b4b4;
|
|
|
|
|
|
background-color: #fff5f5;
|
|
|
|
|
|
color: #d9534f;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 「正在回复 @某人」提示条 */
|
|
|
|
|
|
.comment-reply-hint {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
margin: 0 0 13px;
|
|
|
|
|
|
padding: 8px 13px;
|
|
|
|
|
|
border-left: 3px solid var(--yq-primary, #00a2ff);
|
|
|
|
|
|
border-radius: 0 var(--yq-radius, 4px) var(--yq-radius, 4px) 0;
|
|
|
|
|
|
background-color: #f2f9ff;
|
|
|
|
|
|
color: #3f6b90;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
font-size: 13px;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
line-height: 1.65;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-reply-hint[hidden] {
|
|
|
|
|
|
display: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 昵称/邮箱/网址:三列,窄屏自动堆叠 */
|
|
|
|
|
|
.comment-info {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
gap: 10px;
|
|
|
|
|
|
margin-bottom: 12px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-field {
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
flex: 1 1 180px;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-field-icon {
|
|
|
|
|
|
position: absolute;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
left: 11px;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
top: 50%;
|
|
|
|
|
|
transform: translateY(-50%);
|
2026-10-24 12:16:30 +08:00
|
|
|
|
color: #a8b0bb;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
line-height: 1;
|
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-24 12:16:30 +08:00
|
|
|
|
/* 输入框:3px → 4px 圆角,内边距加 1px。
|
|
|
|
|
|
* 单看差距很小,但三个输入框并排时,"够不够松"决定整体是否廉价。 */
|
2026-10-24 01:03:36 +08:00
|
|
|
|
.comment-input {
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
width: 100%;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
padding: 10px 13px;
|
|
|
|
|
|
border: 1px solid #dfe4ec;
|
|
|
|
|
|
border-radius: var(--yq-radius, 4px);
|
|
|
|
|
|
background-color: var(--yq-bg-input, #fcfcfd);
|
|
|
|
|
|
color: #2b3038;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
font-family: inherit;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
line-height: 1.5;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
transition: border-color 0.16s var(--yq-ease), background-color 0.16s var(--yq-ease),
|
|
|
|
|
|
box-shadow 0.16s var(--yq-ease);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
-webkit-appearance: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-field .comment-input {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
padding-left: 34px;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-24 12:16:30 +08:00
|
|
|
|
/* 占位符:原来复用了 #a4abb5(对比度 2.32)。
|
|
|
|
|
|
* 占位符承载的是「这里该填什么」这层信息,不是纯装饰,
|
|
|
|
|
|
* 所以跟时间戳一起提到 --yq-text-3。
|
|
|
|
|
|
* 注意仍要比已输入的文字(#2b3038)弱一档,否则分不清"填了没有"。 */
|
2026-10-24 01:03:36 +08:00
|
|
|
|
.comment-input::placeholder {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
color: var(--yq-text-3, #6b7280);
|
|
|
|
|
|
opacity: 1; /* Firefox 默认会再压一层透明度,雪上加霜 */
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-input:hover:not(:focus):not(:disabled) {
|
|
|
|
|
|
border-color: #cdd6e2;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-input:focus {
|
|
|
|
|
|
outline: none;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
border-color: var(--yq-primary, #00a2ff);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
background-color: #fff;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
/* 3px 的柔和外环,比原来的 0.1 稍微实一点,
|
|
|
|
|
|
在高亮背景(护眼黄等)下也能看清焦点在哪 */
|
|
|
|
|
|
box-shadow: 0 0 0 3px rgba(0, 162, 255, 0.14);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-input:disabled,
|
|
|
|
|
|
.comment-input[readonly] {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
background-color: #f6f7f9;
|
|
|
|
|
|
color: var(--yq-text-3, #6b7280);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* textarea 容器 */
|
|
|
|
|
|
.comment-textarea {
|
|
|
|
|
|
position: relative;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
border: 1px solid #dfe4ec;
|
|
|
|
|
|
border-radius: var(--yq-radius, 4px);
|
|
|
|
|
|
background-color: var(--yq-bg-input, #fcfcfd);
|
|
|
|
|
|
transition: border-color 0.16s var(--yq-ease), box-shadow 0.16s var(--yq-ease),
|
|
|
|
|
|
background-color 0.16s var(--yq-ease);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-textarea:hover:not(:focus-within) {
|
|
|
|
|
|
border-color: #cdd6e2;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-textarea:focus-within {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
border-color: var(--yq-primary, #00a2ff);
|
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
box-shadow: 0 0 0 3px rgba(0, 162, 255, 0.14);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-textarea .comment-input {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
min-height: 136px;
|
|
|
|
|
|
padding: 12px 14px;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
border: 0;
|
|
|
|
|
|
border-radius: 0;
|
|
|
|
|
|
background: none;
|
|
|
|
|
|
resize: vertical;
|
|
|
|
|
|
box-shadow: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-textarea .comment-input:focus {
|
|
|
|
|
|
box-shadow: none;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
background: none;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 工具条 */
|
|
|
|
|
|
.comment-bar {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
gap: 10px;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
padding: 8px 11px;
|
|
|
|
|
|
border-top: 1px solid #edf0f4;
|
|
|
|
|
|
border-radius: 0 0 var(--yq-radius, 4px) var(--yq-radius, 4px);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
background-color: #fafbfc;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-bar-left,
|
|
|
|
|
|
.comment-bar-right {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
gap: 8px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-bar-left {
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-smile-btn {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
padding: 4px 8px;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
border: 0;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
border-radius: var(--yq-radius, 4px);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
background: none;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
color: var(--yq-text-3, #6b7280);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
font-size: 17px;
|
|
|
|
|
|
line-height: 1;
|
|
|
|
|
|
cursor: pointer;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
transition: color 0.16s var(--yq-ease), background-color 0.16s var(--yq-ease);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-smile-btn:hover {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
background-color: var(--yq-primary-soft, #eaf6ff);
|
|
|
|
|
|
color: var(--yq-primary-dark, #0089db);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 表情面板:3 行 8 列 */
|
|
|
|
|
|
.comment-smile-panel {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
bottom: calc(100% + 8px);
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
z-index: 20;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
width: 264px;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
padding: 9px;
|
|
|
|
|
|
border: 1px solid #e2e7ee;
|
|
|
|
|
|
border-radius: var(--yq-radius-lg, 6px);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
background-color: #fff;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
box-shadow: 0 6px 20px rgba(31, 35, 40, 0.12);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-smile-panel[hidden] {
|
|
|
|
|
|
display: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-smile-panel a {
|
|
|
|
|
|
float: none;
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
margin: 2px;
|
|
|
|
|
|
padding: 3px;
|
|
|
|
|
|
width: 28px;
|
|
|
|
|
|
height: 28px;
|
|
|
|
|
|
border: 1px solid transparent;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
border-radius: var(--yq-radius, 4px);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
background-color: #f7f8fa;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
transition: background-color 0.12s var(--yq-ease), border-color 0.12s var(--yq-ease);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-smile-panel a:hover {
|
|
|
|
|
|
border-color: #b9dcff;
|
|
|
|
|
|
background-color: #eaf4ff;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-smile-panel img {
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
width: 20px;
|
|
|
|
|
|
height: 20px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 状态提示 */
|
|
|
|
|
|
.comment-status {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
color: var(--yq-text-3, #6b7280);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
font-size: 12.5px;
|
|
|
|
|
|
line-height: 1.6;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
transition: color 0.16s var(--yq-ease);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-status.is-ok {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
color: #2f8a3e;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-status.is-err {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
color: #cf3b36;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 提交按钮 */
|
|
|
|
|
|
.comment-submit {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
padding: 9px 24px;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
border: 0;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
border-radius: var(--yq-radius, 4px);
|
|
|
|
|
|
background-color: var(--yq-primary, #00a2ff);
|
|
|
|
|
|
box-shadow: 0 1px 2px rgba(0, 162, 255, 0.24);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
color: #fff;
|
|
|
|
|
|
font-size: 14px;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
font-weight: 500;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
line-height: 1.5;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
white-space: nowrap;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
transition: background-color 0.16s var(--yq-ease), box-shadow 0.16s var(--yq-ease),
|
|
|
|
|
|
opacity 0.16s var(--yq-ease), transform 0.16s var(--yq-ease);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-submit:hover:not(:disabled) {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
background-color: var(--yq-primary-dark, #0089db);
|
|
|
|
|
|
box-shadow: 0 3px 10px rgba(0, 162, 255, 0.3);
|
|
|
|
|
|
transform: translateY(-1px);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-submit:active:not(:disabled) {
|
|
|
|
|
|
transform: none;
|
|
|
|
|
|
box-shadow: 0 1px 2px rgba(0, 162, 255, 0.24);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-submit:focus-visible {
|
|
|
|
|
|
outline: 2px solid var(--yq-primary, #00a2ff);
|
|
|
|
|
|
outline-offset: 2px;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-submit:disabled,
|
|
|
|
|
|
.comment-submit.is-loading {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
opacity: 0.6;
|
|
|
|
|
|
box-shadow: none;
|
|
|
|
|
|
transform: none;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
cursor: default;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* honeypot:移出视口而不是 display:none(display:none 的字段部分爬虫不填) */
|
|
|
|
|
|
.comment-hp {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
left: -9999px;
|
|
|
|
|
|
width: 1px;
|
|
|
|
|
|
height: 1px;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 只需登录才能评论的提示 */
|
|
|
|
|
|
.comments-login-required {
|
|
|
|
|
|
margin: 0;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
padding: 20px;
|
|
|
|
|
|
border: 1px dashed #dfe5ec;
|
|
|
|
|
|
border-radius: var(--yq-radius, 4px);
|
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
|
color: var(--yq-text-3, #6b7280);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
font-size: 13.5px;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
line-height: 1.7;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
text-align: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comments-login-required a {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
color: var(--yq-primary-dark, #0089db);
|
2026-10-24 01:03:36 +08:00
|
|
|
|
text-decoration: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-24 12:16:30 +08:00
|
|
|
|
.comments-login-required a:hover {
|
|
|
|
|
|
text-decoration: underline;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-24 01:03:36 +08:00
|
|
|
|
/*--------------------------------------------------------------
|
|
|
|
|
|
8. 无障碍:屏幕阅读器专用文本
|
|
|
|
|
|
--------------------------------------------------------------*/
|
|
|
|
|
|
|
|
|
|
|
|
.k-main .details .comments .sr-only {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
clip: rect(0, 0, 0, 0);
|
|
|
|
|
|
width: 1px;
|
|
|
|
|
|
height: 1px;
|
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
border: 0;
|
|
|
|
|
|
margin: -1px;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------
|
|
|
|
|
|
9. 响应式
|
|
|
|
|
|
--------------------------------------------------------------*/
|
|
|
|
|
|
|
|
|
|
|
|
@media screen and (max-width: 768px) {
|
|
|
|
|
|
.k-main .details .comments {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
padding: 17px 15px 19px;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comments-head {
|
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
gap: 8px;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
padding-bottom: 13px;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comments-head .title {
|
|
|
|
|
|
font-size: 17px;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
padding-left: 11px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comments-head .title::before {
|
|
|
|
|
|
height: 14px;
|
|
|
|
|
|
margin-top: -7px;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.yang-comment {
|
|
|
|
|
|
/* 只收窄列间距;写 gap 会同时给 grid 的 row-gap 赋值,
|
|
|
|
|
|
导致"主体"与"子评论"之间多出一道空隙 */
|
|
|
|
|
|
column-gap: 10px;
|
2026-10-24 12:16:30 +08:00
|
|
|
|
padding: 14px 0;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-24 12:16:30 +08:00
|
|
|
|
/* ⚠️ 这一组必须同时写容器、img 和占位符的 width。
|
|
|
|
|
|
* 只写 height 是个隐蔽陷阱:`.yang-comment-avatar` 容器收到 36px,
|
|
|
|
|
|
* 但基础规则里 img 的 width 仍是 42px —— img 会**溢出容器右侧** 6px,
|
|
|
|
|
|
* 压在正文上,看起来只是"头像有点歪"。
|
|
|
|
|
|
* 更麻烦的是几何探针量的是容器宽度(`.yang-comment-avatar` 的
|
|
|
|
|
|
* getBoundingClientRect),容器确实是 36 —— 于是断言全绿,
|
|
|
|
|
|
* 溢出完全测不到。这个坑是 `_style_ab.js` 逐元素比对时抓出来的。 */
|
2026-10-24 01:03:36 +08:00
|
|
|
|
.yang-comment-avatar,
|
|
|
|
|
|
.yang-comment-avatar img,
|
|
|
|
|
|
.yang-comment-avatar-img,
|
|
|
|
|
|
.yang-comment-avatar-ph {
|
|
|
|
|
|
width: 36px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.yang-comment-avatar img,
|
|
|
|
|
|
.yang-comment-avatar-img,
|
|
|
|
|
|
.yang-comment-avatar-ph {
|
|
|
|
|
|
height: 36px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-24 12:16:30 +08:00
|
|
|
|
.yang-comment-author {
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.yang-comment-content {
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
line-height: 1.78;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 窄屏缩进收窄:20px 在三层后正文只剩很窄一条。
|
|
|
|
|
|
仍然 ≥6px,`_comments_geometry.js` 的"最小可感知缩进"判据要求的。 */
|
2026-10-24 01:03:36 +08:00
|
|
|
|
.yang-children {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
padding-left: 12px;
|
|
|
|
|
|
margin-top: 3px;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.yang-children .yang-children {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
padding-left: 9px;
|
2026-10-24 01:03:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.yang-children .yang-children .yang-children {
|
|
|
|
|
|
padding-left: 0;
|
|
|
|
|
|
border-left: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-info {
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
gap: 8px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-field {
|
|
|
|
|
|
flex: 1 1 auto;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-bar {
|
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
gap: 8px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-bar-right {
|
|
|
|
|
|
flex: 1 1 100%;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-status {
|
|
|
|
|
|
flex: 1 1 auto;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-24 12:16:30 +08:00
|
|
|
|
.comment-submit {
|
|
|
|
|
|
padding: 9px 20px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-24 01:03:36 +08:00
|
|
|
|
.comment-smile-panel {
|
|
|
|
|
|
width: 240px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@media screen and (max-width: 400px) {
|
2026-10-24 12:16:30 +08:00
|
|
|
|
/* 400px 断点:同样必须把 img 的 width 一起覆盖(理由见 768 断点那条) */
|
2026-10-24 01:03:36 +08:00
|
|
|
|
.yang-comment-avatar,
|
|
|
|
|
|
.yang-comment-avatar img,
|
|
|
|
|
|
.yang-comment-avatar-img,
|
|
|
|
|
|
.yang-comment-avatar-ph {
|
|
|
|
|
|
width: 32px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.yang-comment-avatar img,
|
|
|
|
|
|
.yang-comment-avatar-img,
|
|
|
|
|
|
.yang-comment-avatar-ph {
|
|
|
|
|
|
height: 32px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* ⚠️ 必须一并覆盖深层头像。
|
|
|
|
|
|
上面的基础规则里有 `.yang-children .yang-children .yang-comment-avatar
|
|
|
|
|
|
{ width: 34px }`,它选择器特异性 (0,3,0) 高于这里的 `.yang-comment-avatar`
|
|
|
|
|
|
(0,1,0) —— 媒体查询**不增加**特异性。所以只写这一条的话,窄屏下
|
|
|
|
|
|
深层头像仍是 34px,反而比顶层的 32px 更大,层级关系是反的。 */
|
|
|
|
|
|
.yang-children .yang-children .yang-comment-avatar,
|
|
|
|
|
|
.yang-children .yang-children .yang-comment-avatar img,
|
2026-10-24 12:16:30 +08:00
|
|
|
|
.yang-children .yang-children .yang-comment-avatar-img,
|
2026-10-24 01:03:36 +08:00
|
|
|
|
.yang-children .yang-children .yang-comment-avatar-ph {
|
|
|
|
|
|
width: 26px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.yang-children .yang-children .yang-comment-avatar img,
|
2026-10-24 12:16:30 +08:00
|
|
|
|
.yang-children .yang-children .yang-comment-avatar-img,
|
2026-10-24 01:03:36 +08:00
|
|
|
|
.yang-children .yang-children .yang-comment-avatar-ph {
|
|
|
|
|
|
height: 26px;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-smile-panel {
|
|
|
|
|
|
width: 216px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-24 12:16:30 +08:00
|
|
|
|
/* 尊重"减少动效"偏好:动画全部关掉,但保留视觉状态(颜色、阴影) */
|
|
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
|
|
|
|
.yang-comment,
|
|
|
|
|
|
.yang-comment *,
|
|
|
|
|
|
.comment-submit,
|
|
|
|
|
|
.comments-jump-form,
|
|
|
|
|
|
.comments-more-btn,
|
|
|
|
|
|
.comment-input,
|
|
|
|
|
|
.comment-textarea {
|
|
|
|
|
|
animation: none !important;
|
|
|
|
|
|
transition: none !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comment-submit:hover:not(:disabled) {
|
|
|
|
|
|
transform: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-24 01:03:36 +08:00
|
|
|
|
/*--------------------------------------------------------------
|
|
|
|
|
|
10. 打印:评论不需要按钮
|
|
|
|
|
|
--------------------------------------------------------------*/
|
|
|
|
|
|
|
|
|
|
|
|
@media print {
|
|
|
|
|
|
.comments-jump-form,
|
|
|
|
|
|
.yang-comment-actions,
|
|
|
|
|
|
.comments-more,
|
|
|
|
|
|
.comment-respond {
|
|
|
|
|
|
display: none !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-24 12:16:30 +08:00
|
|
|
|
.k-main .details .comments {
|
|
|
|
|
|
box-shadow: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-24 01:03:36 +08:00
|
|
|
|
.yang-comment-content {
|
|
|
|
|
|
color: #000;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|