fix(css): eliminate minifier warnings for scrollbar styles\n\n- Replace Tailwind @apply + custom dark variant on pseudo-elements\n- Use explicit selectors (html.dark) and hex colors for track/thumb\n- Prevent :where() empty selector warnings during production build

This commit is contained in:
Jason
2025-09-13 15:38:23 +08:00
parent 14db6b8a8f
commit 160da2729e

View File

@@ -25,22 +25,14 @@ html.dark {
color-scheme: dark;
}
/* 滚动条样式 */
::-webkit-scrollbar {
@apply w-1.5 h-1.5;
}
::-webkit-scrollbar-track {
@apply bg-gray-100 dark:bg-gray-800;
}
::-webkit-scrollbar-thumb {
@apply bg-gray-300 rounded dark:bg-gray-600;
}
::-webkit-scrollbar-thumb:hover {
@apply bg-gray-400 dark:bg-gray-500;
}
/* 滚动条样式(避免在伪元素中使用自定义 dark 变体,消除构建警告) */
::-webkit-scrollbar { width: 0.375rem; height: 0.375rem; }
::-webkit-scrollbar-track { background-color: #f4f4f5; }
html.dark ::-webkit-scrollbar-track { background-color: #27272a; }
::-webkit-scrollbar-thumb { background-color: #d4d4d8; border-radius: 0.25rem; }
html.dark ::-webkit-scrollbar-thumb { background-color: #52525b; }
::-webkit-scrollbar-thumb:hover { background-color: #a1a1aa; }
html.dark ::-webkit-scrollbar-thumb:hover { background-color: #71717a; }
/* 焦点样式 */
*:focus-visible {