-
Notifications
You must be signed in to change notification settings - Fork 282
feat(theme): 升级8月份主题的微调,修订dialog 样式的鸿蒙适配等 #3351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -18,82 +18,48 @@ page { | |||||||||||||
--nutui-brand-stop-1: #ff475d; // 渐变色起 | ||||||||||||||
--nutui-brand-stop-2: #fa3725; // 渐变色止 | ||||||||||||||
|
||||||||||||||
// 品牌颜色语义化 | ||||||||||||||
// 品牌主色调默认态,主要功能控件的背景、边框、镂空状态下的文字等 | ||||||||||||||
--nutui-color-primary: var(--nutui-brand-6); | ||||||||||||||
// 品牌渐变色左端 | ||||||||||||||
--nutui-color-primary-stop-1: var(--nutui-brand-stop-1); | ||||||||||||||
// 品牌渐变色右端 | ||||||||||||||
--nutui-color-primary-stop-2: var(--nutui-brand-stop-2); | ||||||||||||||
// 品牌主色调或其他深色背景下的文字 | ||||||||||||||
--nutui-color-primary-text: var(--nutui-color-background-gray-1); | ||||||||||||||
// 品牌主色调点击态,背景、边框、镂空状态下的文字 | ||||||||||||||
--nutui-color-primary-pressed: var(--nutui-brand-7); | ||||||||||||||
// 品牌主色调禁用态,背景、边框、镂空状态下的文字 | ||||||||||||||
--nutui-color-primary-disabled: var(--nutui-color-content-gray-1); | ||||||||||||||
// 品牌主色调特殊禁用态,通过操作后可转位默认态 | ||||||||||||||
--nutui-color-primary-disabled-special: var(--nutui-brand-3); | ||||||||||||||
// 品牌主色调镂空背景点击态 | ||||||||||||||
--nutui-color-primary-light-pressed: var(--nutui-brand-1); | ||||||||||||||
--nutui-color-primary-specialdisabled: var(--nutui-red-3); | ||||||||||||||
|
||||||||||||||
// service color | ||||||||||||||
--nutui-golden-1: #292725; | ||||||||||||||
--nutui-golden-2: #4d4134; | ||||||||||||||
--nutui-golden-3: #c59463; | ||||||||||||||
--nutui-golden-4: #d18e54; | ||||||||||||||
--nutui-golden-1: #fff4e8; | ||||||||||||||
--nutui-golden-2: rgba(184, 124, 63, 0.04); | ||||||||||||||
--nutui-golden-3: rgba(191, 130, 66, 0.2); | ||||||||||||||
--nutui-golden-4: #b87c3f; | ||||||||||||||
--nutui-golden-5: #4d3b2a; | ||||||||||||||
--nutui-golden-6: #33271c; | ||||||||||||||
--nutui-golden-7: #ccb8a3; | ||||||||||||||
|
||||||||||||||
--nutui-golden-stop-1: #fff9f0; | ||||||||||||||
--nutui-golden-stop-2: #ffe3c2; | ||||||||||||||
|
||||||||||||||
// service color 语义化 | ||||||||||||||
--nutui-color-service: var(--nutui-golden-1); | ||||||||||||||
--nutui-color-service-border: var(--nutui-golden-2); | ||||||||||||||
--nutui-color-service-pressed: var(--nutui-golden-4); | ||||||||||||||
--nutui-color-service-stop-1: var(--nutui-golden-stop-1); | ||||||||||||||
--nutui-color-service-stop-2: var(--nutui-golden-stop-2); | ||||||||||||||
--nutui-color-service-text: var(--nutui-golden-3); | ||||||||||||||
|
||||||||||||||
// success color | ||||||||||||||
--nutui-green-1: #1f2920; | ||||||||||||||
--nutui-green-2: #32c241; | ||||||||||||||
--nutui-green-3: #12b222; | ||||||||||||||
|
||||||||||||||
// success color 语义化 | ||||||||||||||
--nutui-color-success: var(--nutui-green-2); // 深背景 | ||||||||||||||
--nutui-color-success-light: var(--nutui-green-1); // 浅背景 | ||||||||||||||
--nutui-color-success-pressed: var(--nutui-green-3); // 文字 | ||||||||||||||
|
||||||||||||||
// danger color | ||||||||||||||
--nutui-red-1: #2e2526; | ||||||||||||||
--nutui-red-2: #ff3344; | ||||||||||||||
--nutui-red-3: #ff3344; | ||||||||||||||
--nutui-red-6: #ff3b3b; | ||||||||||||||
// danger color 发现不一致 TODO | ||||||||||||||
|
||||||||||||||
// danger color 语义化 | ||||||||||||||
--nutui-color-danger: var(--nutui-red-2); // 背景或文字 | ||||||||||||||
--nutui-color-danger-light: var(--nutui-red-1); // 背景 | ||||||||||||||
// red color | ||||||||||||||
--nutui-red-1: #4c1c20; | ||||||||||||||
--nutui-red-2: #621a20; | ||||||||||||||
--nutui-red-3: #603840; | ||||||||||||||
--nutui-red-4: #893f49; | ||||||||||||||
--nutui-red-5: #bc3139; | ||||||||||||||
--nutui-red-6: #bc3139; | ||||||||||||||
--nutui-red-7: #ed3b34; | ||||||||||||||
--nutui-red-8: #ff5144; | ||||||||||||||
--nutui-red-9: #ff9382; | ||||||||||||||
--nutui-red-10: #ffccbf; | ||||||||||||||
--nutui-red-11: #ffe7e0; | ||||||||||||||
|
||||||||||||||
// warning color | ||||||||||||||
--nutui-yellow-1: #29271f; | ||||||||||||||
--nutui-yellow-2: #faaf00; | ||||||||||||||
--nutui-yellow-3: #c47600; //todo | ||||||||||||||
|
||||||||||||||
// warning color 语义化 | ||||||||||||||
--nutui-color-warning: var(--nutui-yellow-2); // 深背景 | ||||||||||||||
--nutui-color-warning-light: var(--nutui-yellow-1); // 浅背景 | ||||||||||||||
--nutui-color-warning-pressed: var(--nutui-yellow-3); // 文字 | ||||||||||||||
--nutui-yellow-3: #cc8500; | ||||||||||||||
|
||||||||||||||
// info color | ||||||||||||||
--nutui-blue-1: #23292e; | ||||||||||||||
--nutui-blue-2: #3385ff; | ||||||||||||||
|
||||||||||||||
// info color 语义化 | ||||||||||||||
--nutui-color-info: var(--nutui-blue-2); // 背景或文字,链接色 | ||||||||||||||
--nutui-color-info-light: var(--nutui-blue-1); // 背景 | ||||||||||||||
|
||||||||||||||
--nutui-secondary-1: #14cc33; // 辅助色 | ||||||||||||||
--nutui-color-text-link: var(--nutui-blue-2); | ||||||||||||||
|
||||||||||||||
// 背景色 | ||||||||||||||
// 卡片背景色 | ||||||||||||||
|
@@ -102,6 +68,8 @@ page { | |||||||||||||
--nutui-gray-2: #141414; | ||||||||||||||
// 页面基底色,用于卡片式页面的兜底,永远置于页面最底层。 | ||||||||||||||
--nutui-gray-3: #0a0a0a; | ||||||||||||||
// 组件背景色,2025年新增 | ||||||||||||||
--nutui-gray-9: #333333; | ||||||||||||||
// 文字色 | ||||||||||||||
// 四级文字色,不可操作内容色,用于预置内容、无效内容、特殊不可点击按钮、组件边框线等。 | ||||||||||||||
--nutui-gray-4: #666666; | ||||||||||||||
|
@@ -120,7 +88,7 @@ page { | |||||||||||||
--nutui-black-2: rgba(0, 0, 0, 0.1); | ||||||||||||||
// 线条色 | ||||||||||||||
// 间隔线/容错线,用于结构或信息分割 | ||||||||||||||
--nutui-black-3: rgba(255, 255, 255, 0.06); | ||||||||||||||
--nutui-black-3: rgba(255, 255, 255, 0.08); | ||||||||||||||
--nutui-black-4: rgba(20, 20, 20, 0.1); | ||||||||||||||
--nutui-black-5: rgba(20, 20, 20, 0.2); | ||||||||||||||
--nutui-black-6: rgba(20, 20, 20, 0.3); | ||||||||||||||
|
@@ -150,6 +118,69 @@ page { | |||||||||||||
--nutui-white-12: rgba(31, 31, 31, 0.9); | ||||||||||||||
// --nutui-white-13: rgba(255, 255, 255, 1); | ||||||||||||||
|
||||||||||||||
// 品牌颜色语义化 | ||||||||||||||
// 品牌主色调默认态,主要功能控件的背景、边框、镂空状态下的文字等 | ||||||||||||||
--nutui-color-primary: var(--nutui-brand-6); | ||||||||||||||
// 品牌渐变色左端 | ||||||||||||||
--nutui-color-primary-stop-1: var(--nutui-brand-stop-1); | ||||||||||||||
// 品牌渐变色右端 | ||||||||||||||
--nutui-color-primary-stop-2: var(--nutui-brand-stop-2); | ||||||||||||||
// 品牌主色调或其他深色背景下的文字 | ||||||||||||||
--nutui-color-primary-text: var(--nutui-color-background-gray-1); | ||||||||||||||
// 品牌主色调点击态,背景、边框、镂空状态下的文字 | ||||||||||||||
--nutui-color-primary-pressed: var(--nutui-red-7); | ||||||||||||||
// 品牌主色调禁用态,背景、边框、镂空状态下的文字 | ||||||||||||||
--nutui-color-primary-disabled: var(--nutui-color-content-gray-1); | ||||||||||||||
// 品牌主色调特殊禁用态,通过操作后可转位默认态 | ||||||||||||||
--nutui-color-primary-disabled-special: var(--nutui-red-3); | ||||||||||||||
// 2025 新增 | ||||||||||||||
--nutui-color-primary-light: var(--nutui-brand-1); | ||||||||||||||
// 品牌主色调镂空背景点击态 | ||||||||||||||
--nutui-color-primary-light-pressed: var(--nutui-red-2); | ||||||||||||||
// 看上去命名和上边重复,去掉 | ||||||||||||||
// --nutui-color-primary-specialdisabled: var(--nutui-red-3); | ||||||||||||||
|
||||||||||||||
Comment on lines
+121
to
+142
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainPrimary 语义:pressed/disabled 映射需一致性校验与回归扫描
🏁 Script executed: #!/bin/bash
# 扫描可能遗留的旧主色变量引用
rg -nP --glob '!**/dist/**' '\b--nutui-(brand-(pressed|text|disabled|light)|color-primary-(specialdisabled))\b|var\(--nutui-brand-' Length of output: 3517 统一 primary pressed/disabled 语义并替换旧变量
|
||||||||||||||
// service color 语义化 | ||||||||||||||
// 金色背景 | ||||||||||||||
--nutui-color-service: var(--nutui-golden-1); | ||||||||||||||
// 填充标签边框 | ||||||||||||||
--nutui-color-service-border-1: var(--nutui-golden-2); | ||||||||||||||
// 线框标签边框 | ||||||||||||||
--nutui-color-service-border-2: var(--nutui-golden-3); | ||||||||||||||
// 废弃 | ||||||||||||||
// --nutui-color-service-border: var(--nutui-golden-2); | ||||||||||||||
--nutui-color-service-pressed: var(--nutui-golden-4); | ||||||||||||||
// 金色文字 | ||||||||||||||
--nutui-color-service-text: var(--nutui-golden-4); | ||||||||||||||
// 金色按钮背景 | ||||||||||||||
--nutui-color-service-btn-bg: var(--nutui-golden-5); | ||||||||||||||
// 金色按钮点击态背景 | ||||||||||||||
--nutui-color-service-btn-bg-pressed: var(--nutui-golden-6); | ||||||||||||||
// 金色按钮文字 | ||||||||||||||
--nutui-color-service-btn-text: var(--nutui-golden-7); | ||||||||||||||
|
||||||||||||||
--nutui-color-service-stop-1: var(--nutui-golden-stop-1); | ||||||||||||||
--nutui-color-service-stop-2: var(--nutui-golden-stop-2); | ||||||||||||||
|
||||||||||||||
// success color 语义化 | ||||||||||||||
--nutui-color-success: var(--nutui-green-2); // 深背景 | ||||||||||||||
--nutui-color-success-light: var(--nutui-green-1); // 浅背景 | ||||||||||||||
--nutui-color-success-pressed: var(--nutui-green-3); // 文字 | ||||||||||||||
|
||||||||||||||
// danger color 语义化,待办,看上去目前非常的独立 @周峯 | ||||||||||||||
--nutui-color-danger: var(--nutui-red-2); // 背景或文字 | ||||||||||||||
--nutui-color-danger-light: var(--nutui-red-1); // 背景 | ||||||||||||||
|
||||||||||||||
// info color 语义化 | ||||||||||||||
--nutui-color-info: var(--nutui-blue-2); // 背景或文字,链接色 | ||||||||||||||
--nutui-color-info-light: var(--nutui-blue-1); // 背景 | ||||||||||||||
--nutui-color-text-link: var(--nutui-blue-2); | ||||||||||||||
|
||||||||||||||
// warning color 语义化 | ||||||||||||||
--nutui-color-warning: var(--nutui-yellow-2); // 深背景 | ||||||||||||||
--nutui-color-warning-light: var(--nutui-yellow-1); // 浅背景 | ||||||||||||||
--nutui-color-warning-pressed: var(--nutui-yellow-3); // 文字 | ||||||||||||||
|
||||||||||||||
// 文字颜色值 语义化 | ||||||||||||||
--nutui-color-content-gray-1: var(--nutui-gray-4); | ||||||||||||||
--nutui-color-content-gray-2: var(--nutui-gray-5); | ||||||||||||||
|
@@ -168,12 +199,15 @@ page { | |||||||||||||
--nutui-color-background-gray-1: var(--nutui-gray-1); | ||||||||||||||
--nutui-color-background-gray-2: var(--nutui-gray-2); | ||||||||||||||
--nutui-color-background-gray-3: var(--nutui-gray-3); | ||||||||||||||
--nutui-color-background-gray-4: var(--nutui-gray-9); | ||||||||||||||
// 页面背景 | ||||||||||||||
--nutui-color-background: var(--nutui-color-background-gray-3); | ||||||||||||||
// 卡片背景 | ||||||||||||||
--nutui-color-background-overlay: var(--nutui-color-background-gray-1); | ||||||||||||||
// 卡片内容器背景 | ||||||||||||||
--nutui-color-background-sunken: var(--nutui-color-background-gray-2); | ||||||||||||||
// 组件背景,2025年新增 | ||||||||||||||
--nutui-color-background-component: var(--nutui-color-background-gray-4); | ||||||||||||||
|
||||||||||||||
Comment on lines
+209
to
211
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion 为 Dialog 新增背景语义变量并提供暗黑默认映射;补充鸿蒙兜底策略
// 组件背景,2025年新增
--nutui-color-background-component: var(--nutui-color-background-gray-4);
+ // Dialog 背景(暗黑)
+ --nutui-dialog-background: var(--nutui-color-background-component); 如需,我可提交一个 hm 平台差异化样式片段(基于选择器或构建条件)来使用十六进制硬编码色作为兜底。 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||
// 蒙层颜色值 语义化 | ||||||||||||||
--nutui-color-mask-gray-1: var(--nutui-black-2); | ||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
类型枚举新增项位置正确,命名一致性良好
和现有 Dialog 相关条目风格一致,OK。
为确保生效路径完整,请在仓库执行以下脚本检查映射与使用点:
🏁 Script executed:
Length of output: 13027
为 DialogContentMargin 补充 SCSS 默认变量映射
请在以下主题文件中新增
$dialog-content-margin
对应的 SCSS 变量及 CSS 变量默认值声明,确保--nutui-dialog-content-margin
生效:示例: