fix(style): 风格编辑器输入框背景用主题 token,修复回退后暗色模式白底

beta-3 的 Style.tsx 把输入/文本域背景写死 #fff,回退后在系统暗色模式下
会显示刺眼白底。改回 var(--ol-style-input-bg)(浅色 rgba(255,255,255,.86)、
暗色 rgba(255,255,255,.04)),随主题自动跟随。Claude 审核指出。
This commit is contained in:
baiqing committed 2026-06-13 14:00:36 +08:00
1 parent 5671805a09
commit 760f662f73
1 file changed
+4 -4
+4 -4
View File
@@ -1147,7 +1147,7 @@ export function Style() {
<textarea
value={example.input}
onChange={event => patchExample(index, { input: event.target.value })}
style={{ ...textareaStyle, minHeight: 120, background: '#fff' }}
style={{ ...textareaStyle, minHeight: 120, background: 'var(--ol-style-input-bg)' }}
/>
</div>
@@ -1165,7 +1165,7 @@ export function Style() {
<textarea
value={example.output}
onChange={event => patchExample(index, { output: event.target.value })}
style={{ ...textareaStyle, minHeight: 120, background: '#fff' }}
style={{ ...textareaStyle, minHeight: 120, background: 'var(--ol-style-input-bg)' }}
/>
</div>
</div>
@@ -1247,7 +1247,7 @@ const inputStyle: CSSProperties = {
padding: '9px 11px',
borderRadius: 10,
border: '0.5px solid var(--ol-line-strong)',
background: '#fff',
background: 'var(--ol-style-input-bg)',
color: 'var(--ol-ink)',
font: 'inherit',
fontSize: 12.5,
@@ -1259,7 +1259,7 @@ const textareaStyle: CSSProperties = {
padding: '11px 12px',
borderRadius: 12,
border: '0.5px solid var(--ol-line-strong)',
background: '#fff',
background: 'var(--ol-style-input-bg)',
color: 'var(--ol-ink)',
font: 'inherit',
fontSize: 12.5,