/** * 修复 Chakra UI Select 组件的下拉选项颜色问题 * 黑金主题下,下拉选项需要深色背景和白色文字 */ /* 所有 select 元素的 option 样式 */ select option { background-color: #1A1A1A !important; /* 深色背景 */ color: #FFFFFF !important; /* 白色文字 */ padding: 8px !important; } /* 选中的 option */ select option:checked { background-color: #2A2A2A !important; color: #FFC107 !important; /* 金色高亮 */ } /* hover 状态的 option (某些浏览器支持) */ select option:hover { background-color: #222222 !important; color: #FFD700 !important; } /* 禁用的 option */ select option:disabled { color: #808080 !important; background-color: #151515 !important; } /* Firefox 特殊处理 */ @-moz-document url-prefix() { select option { background-color: #1A1A1A !important; color: #FFFFFF !important; } } /* Webkit/Chrome 特殊处理 */ select { /* 自定义下拉箭头颜色 */ color-scheme: dark; } /* 修复 Chakra UI Select 组件的特定样式 */ .chakra-select { background-color: #1A1A1A !important; color: #FFFFFF !important; border-color: #333333 !important; } .chakra-select:hover { border-color: #404040 !important; } .chakra-select:focus { border-color: #FFC107 !important; box-shadow: 0 0 0 1px rgba(255, 193, 7, 0.3) !important; } /* 下拉箭头图标 */ .chakra-select__icon-wrapper { color: #FFFFFF !important; } /* 修复所有表单 select 元素 */ select[class*="chakra-select"], select[class*="select"] { background-color: #1A1A1A !important; color: #FFFFFF !important; } /* 自定义滚动条 (适用于下拉列表) */ select::-webkit-scrollbar { width: 8px; } select::-webkit-scrollbar-track { background: #0A0A0A; } select::-webkit-scrollbar-thumb { background: #333333; border-radius: 4px; } select::-webkit-scrollbar-thumb:hover { background: #FFC107; } /** * Ant Design AutoComplete 下拉框样式 (FUI 主题) */ .fui-autocomplete-dropdown { background-color: #1a1a2e !important; border: 1px solid rgba(212, 175, 55, 0.3) !important; border-radius: 10px !important; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important; } .fui-autocomplete-dropdown .ant-select-item { color: #ffffff !important; padding: 10px 12px !important; border-bottom: 1px solid rgba(212, 175, 55, 0.1); } .fui-autocomplete-dropdown .ant-select-item:last-child { border-bottom: none; } .fui-autocomplete-dropdown .ant-select-item-option-active, .fui-autocomplete-dropdown .ant-select-item:hover { background-color: rgba(212, 175, 55, 0.15) !important; } .fui-autocomplete-dropdown .ant-select-item-option-selected { background-color: rgba(212, 175, 55, 0.25) !important; } .fui-autocomplete-dropdown .ant-select-item-empty { color: rgba(255, 255, 255, 0.5) !important; } /* AutoComplete 下拉框滚动条 */ .fui-autocomplete-dropdown::-webkit-scrollbar { width: 6px; } .fui-autocomplete-dropdown::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); border-radius: 3px; } .fui-autocomplete-dropdown::-webkit-scrollbar-thumb { background: rgba(212, 175, 55, 0.4); border-radius: 3px; } .fui-autocomplete-dropdown::-webkit-scrollbar-thumb:hover { background: rgba(212, 175, 55, 0.6); }