Conversation
The submit button text color has been hardcoded to white since the 3.0 UnoCSS refactor removed the legacy --halo-comment-widget-component-form-button-submit-color variable without a replacement, while the button background was already wired to --halo-cw-primary-1-color. Themes therefore cannot adjust the text color on primary buttons, and the default white on the light fallback (#4CCBA0) fails WCAG AA contrast (2.03:1); the shipped dark palette (#059669) yields 3.77:1 — both below the 4.5:1 required for 14px text. Introduce --halo-cw-text-submit-color (default #ffffff, preserving the current look) and consume it via a text-text-submit theme token on the comment/reply submit button and the edit form's submit/retry buttons. The deprecated variable row in the theme integration docs now points to its replacement.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
动机
3.0 UnoCSS 重构(ace1c1a)删除了整套旧组件级 CSS 变量,其中提交按钮文字颜色变量
--halo-comment-widget-component-form-button-submit-color没有提供替代:按钮背景后来已接回--halo-cw-primary-1-color(12e83c2),字色却一直写死text-white,成为主色按钮上唯一不由变量驱动的样式面。这带来两个问题:
#4CCBA0上 2.03:1、官方暗色方案#059669上 3.77:1,均低于 14px 按钮文字 WCAG AA 要求的 4.5:1,主题作者无从修复。方案
--halo-cw-text-submit-color(默认#ffffff,不改变现有观感);uno.config.ts的theme.colors.text中注册为submittoken(与primary-1等变量同款写法),评论/回复提交按钮与编辑表单的提交/重试按钮统一消费;dev/theme-integration.md:现行变量表与 CSS 模板补行,废弃表中旧变量的备注回填替代名。验证
pnpm build通过,产物 CSS 生成text-text-submit{color:var(--halo-cw-text-submit-color, #ffffff);};#ffffff,与现有渲染完全一致(无视觉 diff);说明
--halo-cw-primary-contrast-color),我可以随时调整;