Files
gofly-platform-services/zlt-web/react-web-next/src/global.less
T

132 lines
3.4 KiB
Plaintext
Raw Normal View History

@import '~antd/es/style/variable.less';
@import './theme/modern.less';
:root {
--page-padding: 16px;
}
html, body, #root, .ant-pro {
height: 100%;
}
body { background: var(--bg-primary); color: var(--text-primary); }
.ant-layout { background: var(--bg-primary); }
.page-enter {
animation: pageFadeIn .36s var(--ease-out-quart, cubic-bezier(0.25, 1, 0.5, 1));
}
@keyframes pageFadeIn {
from { opacity: 0; transform: translateY(6px); }
to { opacity: 1; transform: translateY(0); }
}
.page-header-actions {
display: flex;
gap: 8px;
}
.card {
background: var(--card-bg);
border-radius: 8px;
}
/* 全局样式优化与移动端适配 */
html, body, #root { height: 100%; }
/* 统一卡片与页面留白 */
.ant-card { border-radius: 8px; background: var(--card-bg); }
.ant-pro-page-container-children-content { padding: 16px; }
/* PageContainer 头部背景与分割线优化,适配深色科技风 */
.ant-pro-page-container-warp {
background: transparent;
}
.ant-pro-page-container {
background: transparent;
}
.ant-pro-page-container .ant-page-header {
background: transparent;
border-bottom: 1px solid var(--divider-color, rgba(255,255,255,.08));
}
/* 表格在小屏下横向滚动 */
@media (max-width: 768px) {
.ant-pro-table .ant-table-wrapper, .ant-table-wrapper { overflow-x: auto; }
.ant-pro-table .ant-table { min-width: 720px; }
.ant-pro-page-container-children-content { padding: 12px; }
2025-10-14 16:27:25 +08:00
/* 移动端下拉与日期弹层不超出视口 */
.ant-picker-dropdown { max-width: 100vw; }
.ant-picker-dropdown .ant-picker-panels { display: flex; flex-direction: column; }
.ant-select-dropdown { max-width: 100vw; }
/* TreeSelect 节点文案允许换行,避免横向挤出 */
.ant-select-tree .ant-select-tree-node-content-wrapper { white-space: normal; }
}
/* 更友好的表单间距 */
.ant-form-item { margin-bottom: 12px; }
/* 标题字号适配 */
@media (max-width: 768px) {
h1, .ant-typography h1 { font-size: 22px; }
h2, .ant-typography h2 { font-size: 18px; }
}
/* Slider tooltip 提示框文字颜色优化 */
.ant-slider-tooltip-inner {
background-color: rgba(0, 0, 0, 0.75) !important;
color: #fff !important;
}
.ant-slider .ant-tooltip-inner {
background-color: rgba(0, 0, 0, 0.75) !important;
color: #fff !important;
}
2025-12-09 17:13:20 +08:00
/* 全局 Tooltip 样式优化 - 解决深色主题下文字看不清的问题 */
.ant-tooltip {
.ant-tooltip-inner {
background-color: rgba(40, 40, 40, 0.95) !important;
color: #fff !important;
border: 1px solid rgba(255, 255, 255, 0.1);
}
.ant-tooltip-arrow-content {
background-color: rgba(40, 40, 40, 0.95) !important;
}
}
/* 按钮 Tooltip 确保清晰可见 */
.ant-btn + .ant-tooltip,
.ant-tooltip {
.ant-tooltip-inner {
background-color: rgba(30, 30, 30, 0.95) !important;
color: #ffffff !important;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
}
/* Popover 和 Popconfirm 样式优化 */
.ant-popover {
.ant-popover-inner {
background-color: rgba(40, 40, 40, 0.98) !important;
border: 1px solid rgba(255, 255, 255, 0.1);
}
.ant-popover-inner-content {
color: #fff !important;
}
.ant-popover-title {
color: #fff !important;
border-bottom-color: rgba(255, 255, 255, 0.1);
}
.ant-popover-arrow-content {
background-color: rgba(40, 40, 40, 0.98) !important;
}
.ant-popconfirm-message-title {
color: #fff !important;
}
.ant-popconfirm-description {
color: rgba(255, 255, 255, 0.85) !important;
}
}