global.css 2.82 KB
/* @import "./reset.css"; */
@import "./theme.css";
@import "./table-styles.css";

/* 全局样式 */
/* global.css - 全局通用样式与响应式断点 */
:root {
  --primary-color: #3399ff;
  --success-color: #4caf50;
  --danger-color: #f44336;
  --warning-color: #ffc107;
  --color-warning: var(--warning-color);
  --color-success: var(--success-color);
  --font-size-base: 16px;
  --border-radius: 8px;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

@media (max-width: 1200px) {
  html {
    font-size: 15px;
  }
}
@media (max-width: 992px) {
  html {
    font-size: 14px;
  }
}
@media (max-width: 768px) {
  html {
    font-size: 13px;
  }
}
@media (max-width: 600px) {
  html {
    font-size: 12px;
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.text-ellipsis {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 全局动画和过渡效果 */
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s ease;
}

.fade-enter,
.fade-leave-to {
  opacity: 0;
}

.slide-enter-active,
.slide-leave-active {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-enter,
.slide-leave-to {
  transform: translateX(-100%);
}

.scale-enter-active,
.scale-leave-active {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-enter,
.scale-leave-to {
  transform: scale(0.9);
  opacity: 0;
}

/* 悬停效果增强 */
.hover-lift {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
  transform: translateY(-2px);
}

/* 聚焦效果 */
.focus-ring:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(51, 153, 255, 0.3);
}

/* 全局按钮样式 */
.el-button--primary {
  background: #1e6fff !important;
  border-color: #1e6fff !important;
  color: #fff !important;
}

.el-button--primary:hover {
  background: #4179fc !important;
  border-color: #4179fc !important;
  color: #fff !important;
}

.el-button--primary:focus {
  background: #3399ff !important;
  border-color: #3399ff !important;
  color: #fff !important;
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  background: transparent;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* 深色主题滚动条 */
.theme-dark ::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.theme-dark ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
}

.theme-dark ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}