fix(自学): 练一练的填空框、拖拽卡片、连线项都没有边框,填空题看不出空在哪
Deploy / deploy (push) Canceled after 0s

填空、排序、找错、连线、分组、输出预测六种题的边框和底色写的是 --n-border-color、
--n-color、--n-text-color-3。这几个变量只在 Naive 组件内部才有,自学重设计把外层换成
自己的卡片之后就全没了:边框整个消失,填空题只剩一个看不见的输入框。

换成 learn.css 里自学自己的变量,补了一个可操作控件用的深一档边框和次要文字色,
亮暗两套都有。代码字体原来只写了 Monaco,机房 Windows 没有,换成 --learn-code-font。
顺手把填空框的上下内边距去掉,几行之间不再贴在一起。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
xuyueandClaude Opus 5.5 committed 2026-10-12 14:07:04 +08:00
1 parent e6c02dce33
commit 0e1784ba26
7 files changed
+33 -29

No files matched your search

@@ -52,8 +52,8 @@ function lineStyle(i: number): Record<string, string> {
? "#d03050"
: status === "selected"
? "#2080f0"
: "var(--n-border-color)"
const plain = color === "var(--n-border-color)"
: "var(--learn-control-line)"
const plain = color === "var(--learn-control-line)"
return {
display: "flex",
alignItems: "center",
@@ -63,7 +63,7 @@ function lineStyle(i: number): Record<string, string> {
border: `1.5px solid ${color}`,
background: plain ? "transparent" : color + "14",
cursor: locked.value ? "default" : "pointer",
fontFamily: "Monaco",
fontFamily: "var(--learn-code-font)",
userSelect: "none",
}
}
@@ -88,7 +88,7 @@ function reset() {
<p style="font-weight: 500; font-size: 16px; margin-bottom: 8px">
{{ data.question }}
</p>
<p style="color: var(--n-text-color-3); font-size: 13px; margin: 0 0 12px">
<p style="color: var(--learn-muted); font-size: 13px; margin: 0 0 12px">
点击你认为有错误的代码行(可多选)。
</p>