fix: keep admin theme contrast consistent
CI / test (pull_request) Canceled after 34s
PR合并自动部署 / release-check (pull_request) Successful in 1m35s
PR合并自动部署 / deploy (pull_request) Successful in 10s

This commit is contained in:
2026-08-09 00:34:31 +08:00
parent ce07f6b3b7
commit c365454395
2 changed files with 89 additions and 0 deletions
+14
View File
@@ -20,3 +20,17 @@ def test_app_css_答题提交按钮可见且长弹窗可滚动():
assert "background: var(--green); color: white; text-align: center" in source
assert "max-height: calc(100dvh - 30px)" in source
assert "overflow-y: auto" in source
def test_admin_css_深色系统下仍保持完整浅色主题():
source = (STATIC_ROOT / "admin" / "css" / "hulumath_admin.css").read_text(
encoding="utf-8"
)
assert "color-scheme: light" in source
assert "--body-fg: #17211b" in source
assert "--body-bg: #f3f1e9" in source
assert "--darkened-bg: #ebeae3" in source
assert "background-color: #ffffff !important" in source
assert ".theme-toggle" in source
assert "display: none" in source