styles.scss 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. // Include theming for Angular Material
  2. @use '@angular/material' as mat;
  3. // 导入变量
  4. @use './styles/variables' as *;
  5. // 导入移动端响应式样式
  6. @import './styles/mobile-responsive.scss';
  7. // 自定义字体配置
  8. @include mat.core();
  9. // 定义调色板
  10. $primary-palette: mat.define-palette(mat.$indigo-palette);
  11. $accent-palette: mat.define-palette(mat.$pink-palette, A200, A100, A400);
  12. $warn-palette: mat.define-palette(mat.$red-palette);
  13. // 创建主题
  14. $theme: mat.define-light-theme((
  15. color: (
  16. primary: $primary-palette,
  17. accent: $accent-palette,
  18. warn: $warn-palette,
  19. )
  20. ));
  21. // 应用主题
  22. @include mat.all-component-themes($theme);
  23. body {
  24. // Default the application to a light color theme. This can be changed to
  25. // `dark` to enable the dark color theme, or to `light dark` to defer to the
  26. // user's system settings.
  27. color-scheme: light;
  28. // Set a default background, font and text colors for the application using
  29. // Angular Material's system-level CSS variables. Learn more about these
  30. // variables at https://material.angular.dev/guide/system-variables
  31. background-color: var(--mat-sys-surface);
  32. color: var(--mat-sys-on-surface);
  33. font: var(--mat-sys-body-medium);
  34. // Reset the user agent margin.
  35. margin: 0;
  36. // 使用系统字体栈替代Google Fonts
  37. font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  38. }
  39. /* 使用系统字体栈替代Google Fonts,避免网络请求错误 */
  40. /* You can add global styles to this file, and also import other style files */
  41. /* 🔧 强制全局滚动修复 */
  42. html {
  43. height: 100%;
  44. overflow-y: scroll !important; /* 强制显示垂直滚动条 */
  45. overflow-x: hidden;
  46. }
  47. body {
  48. min-height: 100vh;
  49. height: auto !important; /* 允许内容撑开 */
  50. margin: 0;
  51. padding: 0;
  52. font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  53. overflow-y: visible !important; /* 允许垂直滚动 */
  54. overflow-x: hidden;
  55. position: relative;
  56. }
  57. /* 上传成功弹窗全局样式 - 确保居中显示 */
  58. app-upload-success-modal {
  59. position: fixed !important;
  60. top: 0 !important;
  61. left: 0 !important;
  62. right: 0 !important;
  63. bottom: 0 !important;
  64. width: 100% !important;
  65. height: 100% !important;
  66. z-index: 99998 !important;
  67. pointer-events: none !important;
  68. display: block !important;
  69. }
  70. /* HR Dialog Global Styles - 重新设计解决背景色重合问题 */
  71. .hr-dialog-backdrop {
  72. background: rgba(0, 0, 0, 0.6);
  73. backdrop-filter: blur(4px);
  74. animation: fadeIn 0.3s ease;
  75. }
  76. @keyframes fadeIn {
  77. from { opacity: 0; }
  78. to { opacity: 1; }
  79. }
  80. .hr-dialog {
  81. .mat-mdc-dialog-container .mdc-dialog__surface {
  82. border-radius: 16px;
  83. background: #ffffff;
  84. box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  85. border: 1px solid #e2e8f0;
  86. animation: slideIn 0.3s ease;
  87. }
  88. @keyframes slideIn {
  89. from {
  90. opacity: 0;
  91. transform: translateY(-20px);
  92. }
  93. to {
  94. opacity: 1;
  95. transform: translateY(0);
  96. }
  97. }
  98. .mat-mdc-dialog-title {
  99. margin: 0;
  100. padding: 24px 32px;
  101. color: #ffffff;
  102. border-top-left-radius: 16px;
  103. border-top-right-radius: 16px;
  104. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  105. font-size: 22px;
  106. font-weight: 600;
  107. border-bottom: 1px solid #e2e8f0;
  108. }
  109. .mat-mdc-dialog-content {
  110. padding: 24px 32px;
  111. background: #ffffff;
  112. max-height: 70vh;
  113. overflow-y: auto;
  114. }
  115. .mat-mdc-dialog-actions {
  116. padding: 16px 32px 24px;
  117. border-top: 1px solid #e2e8f0;
  118. background: #f8fafc;
  119. display: flex;
  120. justify-content: flex-end;
  121. gap: 16px;
  122. }
  123. // 表单样式优化
  124. .employee-form {
  125. .form-row {
  126. display: flex;
  127. gap: 16px;
  128. margin-bottom: 16px;
  129. mat-form-field {
  130. flex: 1;
  131. }
  132. }
  133. mat-form-field {
  134. .mat-mdc-form-field-subscript-wrapper {
  135. margin-top: 4px;
  136. }
  137. }
  138. }
  139. // 按钮样式优化
  140. .mat-mdc-raised-button {
  141. border-radius: 8px;
  142. padding: 8px 24px;
  143. font-weight: 500;
  144. transition: all 0.3s ease;
  145. &.mat-primary {
  146. background: #667eea;
  147. color: white;
  148. &:hover {
  149. background: #5a6fd8;
  150. transform: translateY(-1px);
  151. box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  152. }
  153. }
  154. &:not(.mat-primary) {
  155. background: #f1f5f9;
  156. color: #64748b;
  157. &:hover {
  158. background: #e2e8f0;
  159. }
  160. }
  161. }
  162. }