语音按住说话的遮罩改为不透明底色

遮罩顶部伸进会话流 72px,原来只有一层 9% 蓝渐变、没有实底,底下的消息文字直接透上来,
「松手传送」看着就像半透明、也没把底部盖住。改成 --page 实底 + 上沿 20px 渐隐衔接,
提示文案由 --gray 加深到 #5f6672,取消态同步改为同样的实底 + 红调。
This commit is contained in:
2026-10-24 19:37:26 +08:00
parent 153a8768bf
commit f97eb566e3
+13 -6
View File
@@ -423,14 +423,14 @@ footer { position: relative; flex: none; padding: 8px 12px calc(10px + env(safe-
/* 录音中给一个极浅底色作反馈(文字同时变成「松开 结束」) */
#voice-hold.recording { background: var(--surface); }
/* 录音期间:输入卡内容整体让位给遮罩(透明渐变不能把按钮/文字透出来) */
/* 录音期间:输入卡内容整体让位给遮罩(遮罩不再透光,按钮/文字留着会和提示叠字) */
body.voice-active .input-shell { border-color: transparent; box-shadow: none; }
body.voice-active .input-shell > *:not(#voice-overlay) { visibility: hidden; }
body.voice-active .attach-chips { visibility: hidden; }
body.voice-active .scroll-bottom-btn { display: none; }
/* 按住说话的遮罩:左右贴屏幕两边;底部一直铺到屏幕底(含 footer 的 10px 内边距与安全区),
向上多铺 72px 让渐变淡出。
向上多铺 72px 把输入卡上方那一条会话流也盖住。
声波中心对齐「按住 说话」那一行:padding-bottom 70px + 安全区 =
59(声波中心到输入卡底部)+ 11(遮罩底边向下外扩的 1px 边框 + 10px footer 内边距)。 */
#voice-overlay {
@@ -442,18 +442,25 @@ body.voice-active .scroll-bottom-btn { display: none; }
display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
gap: 20px;
padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
/* 极淡的蓝调,从下往上淡出(“几乎看不出来,仔细看才有一层”) */
background: linear-gradient(to top, rgba(57, 100, 254, .09), rgba(57, 100, 254, 0));
/* 底色必须是**不透明**的 var(--page):早先只铺一层 9% 蓝渐变,遮罩伸进会话流的那一段
会把底下的消息文字透出来,「松手传送」看着就成了半透明。
顶层那 20px 由透明渐变到 --page 只是把上边缘与会话流接上,别把整块都做成渐变。 */
background:
linear-gradient(to top, rgba(57, 100, 254, .09), rgba(57, 100, 254, 0) 70%),
linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--page) 20px);
color: var(--active);
pointer-events: auto; touch-action: none;
transition: background .15s linear, color .15s linear;
}
/* 上滑取消态:整体换成极淡的红调,声波/文案同步变红 */
#voice-overlay.cancel {
background: linear-gradient(to top, rgba(192, 57, 43, .09), rgba(192, 57, 43, 0));
background:
linear-gradient(to top, rgba(192, 57, 43, .09), rgba(192, 57, 43, 0) 70%),
linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--page) 20px);
color: #c0392b;
}
.vo-hint { font-size: 13px; line-height: 18px; color: var(--gray); letter-spacing: .2px; }
/* 提示文案落在外挂层上,用比 --gray 深一档的中灰:13px 的字在浅灰上发虚 */
.vo-hint { font-size: 13px; line-height: 18px; color: #5f6672; letter-spacing: .2px; }
.vo-wave { display: flex; align-items: center; justify-content: center; gap: 3px; height: 34px; max-width: 100%; }
/* 柱子高度用 scaleY 而不是 height:只走合成层,不触发重排 */
.vo-wave i {