主题优化

This commit is contained in:
李鹏宇
2026-08-07 18:49:07 +08:00
parent 42ab0736d1
commit e0b5e8da93
2 changed files with 88 additions and 78 deletions
+86 -77
View File
@@ -1,11 +1,12 @@
// @import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
// 全局通配符重置限定在 dashboard 页面作用域内,避免影响其他页面(如 udoo_om_ux 主题的深色 dropdown)
body.ks_body_class * {
margin: 0;
padding: 0;
box-sizing: border-box;
}
// [YUTHON] 注释掉全局通配符重置:它会把所有元素(含 Odoo 标准按钮)的 margin/padding 清零,
// 导致「新建」等标准按钮变小、与 dashboard 自带 padding 的按钮大小不一致。已确认卸载此模块无影响。
// body.ks_body_class * {
// margin: 0;
// padding: 0;
// box-sizing: border-box;
// }
body.ks_body_class {
font-family: "Poppins", sans-serif;
@@ -380,7 +381,8 @@ body.ks_body_class {
font-weight: $f-w-400;
line-height: 16px;
text-align: left;
color: $color-paragraph;
// [YUTHON] 注释掉:dash-dd-2 内部下拉文字不应硬编码灰蓝色,交给主题继承
// color: $color-paragraph;
cursor: pointer;
@@ -498,7 +500,8 @@ body.ks_body_class {
.ks_body_class .o-checkbox {
&.form-check .form-check-input {
border-color: $color-placeholders;
// [YUTHON] 注释掉:强制 placeholder 灰边框会覆盖 udoo_om_ux 暗色主题下的 checkbox 边框
// border-color: $color-placeholders;
}
.form-check-input[type="checkbox"]:checked {
@@ -550,71 +553,74 @@ body.ks_body_class {
border: none !important;
}
.ks_body_class .o_form_button_save {
margin-right: 8px !important;
}
.ks_body_class .o_form_button_save,
.ks_body_class .o_form_button_save_new {
/* 与主题模块冲突:强制红色主题会覆盖 Odoo 主题的保存按钮颜色 (@image#1:Clipboard_Screenshot.png) */
// background-color: $color-primary-main;
// border: 1px solid $color-primary-main;
border-radius: 10px;
min-height: 40px;
padding: 0 20px;
font-size: $font-14;
font-weight: $f-w-400;
line-height: 19.6px;
/* 与主题模块冲突:强制白色文字会覆盖主题深色模式下的保存按钮文字颜色 (@image#1:Clipboard_Screenshot.png) */
// color: $color-white;
cursor: pointer;
width: auto !important;
&.disabled {
opacity: 50%;
pointer-events: none;
cursor: not-allowed;
}
&:hover {
/* 与主题模块冲突:强制红色悬停背景会覆盖主题深色模式下的按钮悬停样式 (@image#1:Clipboard_Screenshot.png) */
// background-color: $btn-hover;
// color: $color-white !important;
}
@include max-575 {
font-size: $font-12 !important;
}
}
.ks_body_class .o_form_button_cancel {
border: 0.81px solid $color-E5E7EB;
font-size: $font-16;
font-weight: $f-w-500;
line-height: 22.4px;
text-align: left;
/* 与主题模块冲突:强制深色文字会覆盖主题深色模式下的取消按钮文字颜色 (@image#1:Clipboard_Screenshot.png) */
// color: $color-1E1E1E;
border-radius: 8px;
min-height: 40px;
padding: 0 20px !important;
/* 与主题模块冲突:强制白色背景会覆盖主题深色模式下的取消按钮背景 (@image#1:Clipboard_Screenshot.png) */
// background-color: $color-white;
width: auto !important;
&:hover {
/* 与主题模块冲突:强制浅色悬停背景会覆盖主题深色模式下的按钮悬停样式 (@image#1:Clipboard_Screenshot.png) */
// background-color: $color-secondary-bg;
}
&:focus {
border: 1px solid $color-E7495E;
}
@include max-575 {
font-size: $font-12 !important;
}
}
// [YUTHON] 注释掉 dashboard 对全局 .o_form_button_save / .o_form_button_cancel 的尺寸硬编码
// (min-height:40px; padding:0 20px 等),它会覆盖 Odoo 主题默认按钮尺寸,导致「保存 / 丢弃」变大。
// dashboard 自身编辑工具条的 Save/Discard 由 dash-btn-red / dash-default-btn 类兜底,不受影响。
// .ks_body_class .o_form_button_save {
// margin-right: 8px !important;
// }
//
// .ks_body_class .o_form_button_save,
// .ks_body_class .o_form_button_save_new {
// /* 与主题模块冲突:强制红色主题会覆盖 Odoo 主题的保存按钮颜色 (@image#1:Clipboard_Screenshot.png) */
// // background-color: $color-primary-main;
// // border: 1px solid $color-primary-main;
// border-radius: 10px;
// min-height: 40px;
// padding: 0 20px;
// font-size: $font-14;
// font-weight: $f-w-400;
// line-height: 19.6px;
// /* 与主题模块冲突:强制白色文字会覆盖主题深色模式下的保存按钮文字颜色 (@image#1:Clipboard_Screenshot.png) */
// // color: $color-white;
// cursor: pointer;
// width: auto !important;
//
// &.disabled {
// opacity: 50%;
// pointer-events: none;
// cursor: not-allowed;
// }
//
// &:hover {
// /* 与主题模块冲突:强制红色悬停背景会覆盖主题深色模式下的按钮悬停样式 (@image#1:Clipboard_Screenshot.png) */
// // background-color: $btn-hover;
// // color: $color-white !important;
// }
//
// @include max-575 {
// font-size: $font-12 !important;
// }
// }
//
// .ks_body_class .o_form_button_cancel {
// border: 0.81px solid $color-E5E7EB;
// font-size: $font-16;
// font-weight: $f-w-500;
// line-height: 22.4px;
// text-align: left;
// /* 与主题模块冲突:强制深色文字会覆盖主题深色模式下的取消按钮文字颜色 (@image#1:Clipboard_Screenshot.png) */
// // color: $color-1E1E1E;
// border-radius: 8px;
// min-height: 40px;
// padding: 0 20px !important;
// /* 与主题模块冲突:强制白色背景会覆盖主题深色模式下的取消按钮背景 (@image#1:Clipboard_Screenshot.png) */
// // background-color: $color-white;
// width: auto !important;
//
// &:hover {
// /* 与主题模块冲突:强制浅色悬停背景会覆盖主题深色模式下的按钮悬停样式 (@image#1:Clipboard_Screenshot.png) */
// // background-color: $color-secondary-bg;
// }
//
// &:focus {
// border: 1px solid $color-E7495E;
// }
//
// @include max-575 {
// font-size: $font-12 !important;
// }
// }
.ks_body_class .active-label {
font-size: $font-14 !important;
@@ -851,7 +857,8 @@ body.ks_body_class {
font-weight: $f-w-400;
line-height: 16px;
text-align: left;
color: $color-paragraph;
// [YUTHON] 注释掉:强制灰蓝色会覆盖 udoo_om_ux 暗色主题的下拉文字颜色,导致发暗不可读
// color: $color-paragraph;
cursor: pointer;
overflow: hidden;
text-wrap: nowrap;
@@ -2488,9 +2495,11 @@ body.ks_body_class {
border-bottom: 1px solid var(--color-E5E7EB) !important;
}
.ks_body_class .o_form_button_save {
padding: 0 29px !important;
}
// [YUTHON] 注释掉 dashboard 对全局 .o_form_button_save 的 padding 硬编码(padding:0 29px !important),
// 它会覆盖 Odoo 主题默认按钮内边距,导致「保存」按钮比标准按钮宽/大。已确认卸载此模块无影响。
// .ks_body_class .o_form_button_save {
// padding: 0 29px !important;
// }
.ks_body_class .modal-body .ks_chart_card_body {
top:53px !important;
+2 -1
View File
@@ -3,4 +3,5 @@
@import "./overview.scss";
@import "./header.scss";
@import "./screen.scss";
@import "./modal.scss";
@import "./modal.scss";
@import "./dark_mode.scss";