whistle.mock-plugins
Version:
Whistle 插件,用于快速创建 API 模拟数据
619 lines (504 loc) • 15 kB
CSS
/* ============================================================
Whistle Mock Plugin - Earth Tone Theme Override
覆盖 Ant Design 5 和项目自定义样式为大地色系风格
============================================================ */
/* ── 全局背景与文字 ── */
body.earth-theme, body.earth-theme #root{
background-color: #f0ebe3 ;
color: #3d3630 ;
font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
body.earth-theme{
--primary-color: #b87333;
--primary-hover: #c9894d;
--primary-active: #9a5f2a;
--success-color: #6b8e23;
--warning-color: #d4a017;
--error-color: #c0392b;
--font-color: #3d3630;
--text-secondary: #6d6459;
--text-light: #9e9488;
--border-color: #e0d8cf;
--border-radius: 6px;
--card-shadow: 0 2px 8px rgba(61, 54, 48, 0.06);
--transition-time: 0.3s;
--ant-color-primary: #b87333;
--ant-color-primary-hover: #c9894d;
--ant-color-primary-active: #9a5f2a;
--ant-color-success: #6b8e23;
--ant-color-warning: #d4a017;
--ant-color-error: #c0392b;
--ant-color-info: #8d6e63;
--ant-color-text: #3d3630;
--ant-color-text-secondary: #6d6459;
--ant-color-border: #e0d8cf;
--ant-color-bg-base: #f0ebe3;
--ant-color-bg-container: #fdfcfa;
--ant-color-bg-elevated: #f5f0e8;
--ant-color-bg-layout: #f0ebe3;
background-color: #f0ebe3 ;
}
body.earth-theme h1, body.earth-theme h2, body.earth-theme h3, body.earth-theme h4, body.earth-theme h5, body.earth-theme h6{
color: #3d3630 ;
}
body.earth-theme a{
color: #b87333 ;
}
body.earth-theme a:hover{
color: #c9894d ;
}
/* ── 滚动条 ── */
body.earth-theme ::-webkit-scrollbar{
width: 6px;
height: 6px;
}
body.earth-theme ::-webkit-scrollbar-track{
background: #f0ebe3;
}
body.earth-theme ::-webkit-scrollbar-thumb{
background: #d5cdc2;
border-radius: 3px;
}
body.earth-theme ::-webkit-scrollbar-thumb:hover{
background: #b87333;
}
/* ── Ant Design Layout ── */
body.earth-theme .ant-layout{
background: #f0ebe3 ;
}
body.earth-theme .ant-layout-header{
background: #fdfcfa ;
border-bottom: 1px solid #e0d8cf ;
box-shadow: 0 1px 4px rgba(61, 54, 48, 0.06) ;
}
body.earth-theme .ant-layout-sider{
background: #f5f0e8 ;
border-right: 1px solid #e0d8cf ;
}
body.earth-theme .ant-layout-content{
background: #fdfcfa ;
}
/* ── Ant Menu ── */
body.earth-theme .ant-menu{
background: #f5f0e8 ;
border-right: none ;
}
body.earth-theme .ant-menu-item{
color: #6d6459 ;
border-radius: 4px ;
margin: 4px 8px ;
}
body.earth-theme .ant-menu-item:hover{
color: #b87333 ;
background: rgba(184, 115, 51, 0.08) ;
}
body.earth-theme .ant-menu-item-selected{
color: #b87333 ;
background: rgba(184, 115, 51, 0.12) ;
}
body.earth-theme .ant-menu-item-selected:hover{
color: #b87333 ;
background: rgba(184, 115, 51, 0.16) ;
}
body.earth-theme .ant-menu-submenu-title{
color: #6d6459 ;
}
body.earth-theme .ant-menu-submenu-selected > .ant-menu-submenu-title{
color: #b87333 ;
}
/* ── Ant Card ── */
body.earth-theme .ant-card{
background: #fdfcfa ;
border: 1px solid #e0d8cf ;
border-radius: 6px ;
box-shadow: 0 2px 8px rgba(61, 54, 48, 0.06) ;
}
body.earth-theme .ant-card-bordered{
border: 1px solid #e0d8cf ;
}
body.earth-theme .ant-card-head{
background: #fdfcfa ;
border-bottom: 1px solid #e0d8cf ;
color: #3d3630 ;
}
body.earth-theme .ant-card-body{
background: #fdfcfa ;
color: #3d3630 ;
}
/* ── Ant Button ── */
body.earth-theme .ant-btn{
border-radius: 4px ;
}
body.earth-theme .ant-btn-primary{
background: #b87333 ;
border-color: #b87333 ;
color: #ffffff ;
font-weight: 500;
}
body.earth-theme .ant-btn-primary:hover{
background: #c9894d ;
border-color: #c9894d ;
box-shadow: 0 2px 8px rgba(184, 115, 51, 0.3) ;
}
body.earth-theme .ant-btn-default{
background: transparent ;
border-color: #e0d8cf ;
color: #6d6459 ;
}
body.earth-theme .ant-btn-default:hover{
border-color: #b87333 ;
color: #b87333 ;
}
body.earth-theme .ant-btn-text{
color: #6d6459 ;
}
body.earth-theme .ant-btn-text:hover{
color: #b87333 ;
background: rgba(184, 115, 51, 0.08) ;
}
body.earth-theme .ant-btn-dangerous{
background: transparent ;
border-color: #c0392b ;
color: #c0392b ;
}
body.earth-theme .ant-btn-dangerous:hover{
background: #c0392b ;
color: #ffffff ;
}
/* ── Ant Table ── */
body.earth-theme .ant-table{
background: #fdfcfa ;
color: #3d3630 ;
}
body.earth-theme .ant-table-thead > tr > th{
background: #f5f0e8 ;
color: #3d3630 ;
border-bottom: 1px solid #e0d8cf ;
font-weight: 600;
}
body.earth-theme .ant-table-tbody > tr > td{
border-bottom: 1px solid #e0d8cf ;
color: #3d3630 ;
}
body.earth-theme .ant-table-tbody > tr:hover > td{
background: rgba(184, 115, 51, 0.04) ;
}
body.earth-theme .ant-table-tbody > tr.ant-table-row-selected > td{
background: rgba(184, 115, 51, 0.08) ;
}
/* ── Ant Input / TextArea ── */
body.earth-theme .ant-input,
body.earth-theme .ant-input-affix-wrapper,
body.earth-theme .ant-input-textarea{
background: #fdfcfa ;
border-color: #e0d8cf ;
color: #3d3630 ;
border-radius: 4px ;
}
body.earth-theme .ant-input:hover,
body.earth-theme .ant-input-affix-wrapper:hover{
border-color: #c9894d ;
}
body.earth-theme .ant-input:focus,
body.earth-theme .ant-input-affix-wrapper:focus,
body.earth-theme .ant-input-focused,
body.earth-theme .ant-input-affix-wrapper-focused{
border-color: #b87333 ;
box-shadow: 0 0 0 2px rgba(184, 115, 51, 0.1) ;
}
body.earth-theme .ant-input::placeholder,
body.earth-theme .ant-input-textarea::placeholder{
color: #9e9488 ;
}
/* ── Ant Select ── */
body.earth-theme .ant-select-selector{
background: #fdfcfa ;
border-color: #e0d8cf ;
color: #3d3630 ;
border-radius: 4px ;
}
body.earth-theme .ant-select:hover .ant-select-selector{
border-color: #c9894d ;
}
body.earth-theme .ant-select-focused .ant-select-selector{
border-color: #b87333 ;
box-shadow: 0 0 0 2px rgba(184, 115, 51, 0.1) ;
}
body.earth-theme .ant-select-dropdown{
background: #fdfcfa ;
border: 1px solid #e0d8cf ;
box-shadow: 0 4px 16px rgba(61, 54, 48, 0.1) ;
}
body.earth-theme .ant-select-item{
color: #3d3630 ;
}
body.earth-theme .ant-select-item-option-selected{
background: rgba(184, 115, 51, 0.12) ;
color: #b87333 ;
font-weight: 500;
}
body.earth-theme .ant-select-item-option-active{
background: rgba(184, 115, 51, 0.06) ;
}
/* ── Ant Modal ── */
body.earth-theme .ant-modal-content{
background: #fdfcfa ;
border: 1px solid #e0d8cf ;
box-shadow: 0 8px 32px rgba(61, 54, 48, 0.12) ;
}
body.earth-theme .ant-modal-header{
background: #fdfcfa ;
border-bottom: 1px solid #e0d8cf ;
color: #3d3630 ;
}
body.earth-theme .ant-modal-title{
color: #3d3630 ;
}
body.earth-theme .ant-modal-close-x{
color: #6d6459 ;
}
body.earth-theme .ant-modal-close-x:hover{
color: #b87333 ;
}
/* ── Ant Drawer ── */
body.earth-theme .ant-drawer-content{
background: #fdfcfa ;
}
body.earth-theme .ant-drawer-header{
background: #fdfcfa ;
border-bottom: 1px solid #e0d8cf ;
}
body.earth-theme .ant-drawer-title{
color: #3d3630 ;
}
body.earth-theme .ant-drawer-close{
color: #6d6459 ;
}
/* ── Ant Tabs ── */
body.earth-theme .ant-tabs-tab{
color: #6d6459 ;
}
body.earth-theme .ant-tabs-tab:hover{
color: #b87333 ;
}
body.earth-theme .ant-tabs-tab-active{
color: #b87333 ;
}
body.earth-theme .ant-tabs-ink-bar{
background: #b87333 ;
}
body.earth-theme .ant-tabs-content{
color: #3d3630 ;
}
/* ── Ant Form ── */
body.earth-theme .ant-form-item-label > label{
color: #3d3630 ;
}
body.earth-theme .ant-form-item-explain-error{
color: #c0392b ;
}
/* ── Ant Switch ── */
body.earth-theme .ant-switch-checked{
background: #b87333 ;
}
body.earth-theme .ant-switch-checked:hover{
background: #c9894d ;
}
/* ── Ant Radio ── */
body.earth-theme .ant-radio-checked .ant-radio-inner{
border-color: #b87333 ;
}
body.earth-theme .ant-radio-checked .ant-radio-inner::after{
background: #b87333 ;
}
body.earth-theme .ant-radio-wrapper:hover .ant-radio,
body.earth-theme .ant-radio:hover .ant-radio-inner{
border-color: #b87333 ;
}
/* ── Ant Checkbox ── */
body.earth-theme .ant-checkbox-checked .ant-checkbox-inner{
background: #b87333 ;
border-color: #b87333 ;
}
body.earth-theme .ant-checkbox-indeterminate .ant-checkbox-inner::after{
background: #b87333 ;
}
body.earth-theme .ant-checkbox-wrapper:hover .ant-checkbox-inner,
body.earth-theme .ant-checkbox:hover .ant-checkbox-inner{
border-color: #b87333 ;
}
/* ── Ant Badge ── */
body.earth-theme .ant-badge-status-dot{
box-shadow: 0 0 4px currentColor ;
}
/* ── Ant Tag ── */
body.earth-theme .ant-tag{
border-radius: 4px ;
}
body.earth-theme .ant-tag-green{
color: #6b8e23 ;
background: rgba(107, 142, 35, 0.1) ;
border-color: rgba(107, 142, 35, 0.2) ;
}
body.earth-theme .ant-tag-blue{
color: #8d6e63 ;
background: rgba(141, 110, 99, 0.1) ;
border-color: rgba(141, 110, 99, 0.2) ;
}
body.earth-theme .ant-tag-red{
color: #c0392b ;
background: rgba(192, 57, 43, 0.1) ;
border-color: rgba(192, 57, 43, 0.2) ;
}
body.earth-theme .ant-tag-orange{
color: #d4a017 ;
background: rgba(212, 160, 23, 0.1) ;
border-color: rgba(212, 160, 23, 0.2) ;
}
body.earth-theme .ant-tag-default{
color: #6d6459 ;
background: #f5f0e8 ;
border-color: #e0d8cf ;
}
/* ── Ant Divider ── */
body.earth-theme .ant-divider{
border-top: 1px solid #e0d8cf ;
}
body.earth-theme .ant-divider-horizontal{
margin: 16px 0 ;
}
/* ── Ant Empty ── */
body.earth-theme .ant-empty-description{
color: #9e9488 ;
}
/* ── Ant Spin ── */
body.earth-theme .ant-spin-dot-item{
background: #b87333 ;
}
/* ── Ant Breadcrumb ── */
body.earth-theme .ant-breadcrumb{
color: #6d6459 ;
}
body.earth-theme .ant-breadcrumb a{
color: #9e9488 ;
}
body.earth-theme .ant-breadcrumb a:hover{
color: #b87333 ;
}
body.earth-theme .ant-breadcrumb-separator{
color: #d5cdc2 ;
}
/* ── Ant Statistic ── */
body.earth-theme .ant-statistic-title{
color: #6d6459 ;
}
body.earth-theme .ant-statistic-content{
color: #3d3630 ;
}
/* ── Ant DatePicker / TimePicker ── */
body.earth-theme .ant-picker{
background: #fdfcfa ;
border-color: #e0d8cf ;
color: #3d3630 ;
}
body.earth-theme .ant-picker:hover{
border-color: #c9894d ;
}
body.earth-theme .ant-picker-focused{
border-color: #b87333 ;
box-shadow: 0 0 0 2px rgba(184, 115, 51, 0.1) ;
}
body.earth-theme .ant-picker-panel{
background: #fdfcfa ;
border: 1px solid #e0d8cf ;
}
body.earth-theme .ant-picker-cell-in-view.ant-picker-cell-selected .ant-picker-cell-inner{
background: #b87333 ;
}
body.earth-theme .ant-picker-cell-in-view.ant-picker-cell-today .ant-picker-cell-inner::before{
border-color: #b87333 ;
}
/* ── Ant Pagination ── */
body.earth-theme .ant-pagination-item-active{
border-color: #b87333 ;
background: #b87333 ;
}
body.earth-theme .ant-pagination-item-active a{
color: #ffffff ;
}
body.earth-theme .ant-pagination-item:hover{
border-color: #b87333 ;
}
body.earth-theme .ant-pagination-item:hover a{
color: #b87333 ;
}
/* ── Ant Popover / Tooltip ── */
body.earth-theme .ant-popover-inner{
background: #fdfcfa ;
border: 1px solid #e0d8cf ;
box-shadow: 0 4px 16px rgba(61, 54, 48, 0.1) ;
}
body.earth-theme .ant-tooltip-inner{
background: #3d3630 ;
color: #fdfcfa ;
}
/* ── Ant Dropdown ── */
body.earth-theme .ant-dropdown-menu{
background: #fdfcfa ;
border: 1px solid #e0d8cf ;
box-shadow: 0 4px 16px rgba(61, 54, 48, 0.1) ;
}
body.earth-theme .ant-dropdown-menu-item{
color: #3d3630 ;
}
body.earth-theme .ant-dropdown-menu-item:hover{
background: rgba(184, 115, 51, 0.06) ;
color: #b87333 ;
}
/* ── Ant Slider ── */
body.earth-theme .ant-slider-track{
background: #b87333 ;
}
body.earth-theme .ant-slider-handle{
border-color: #b87333 ;
}
body.earth-theme .ant-slider-handle:hover{
border-color: #c9894d ;
}
/* ── Ant Tree ── */
body.earth-theme .ant-tree{
background: transparent ;
color: #3d3630 ;
}
body.earth-theme .ant-tree-node-content-wrapper:hover{
background: rgba(184, 115, 51, 0.06) ;
}
body.earth-theme .ant-tree-node-selected{
background: rgba(184, 115, 51, 0.12) ;
color: #b87333 ;
}
/* ── 版本弹窗样式覆盖 ── */
body.earth-theme .version-markdown-content h1{
color: #b87333 ;
border-bottom-color: #e0d8cf ;
}
body.earth-theme .version-markdown-content h2{
color: #3d3630 ;
}
body.earth-theme .version-markdown-content h3{
color: #6b8e23 ;
}
body.earth-theme .version-markdown-content p,
body.earth-theme .version-markdown-content li{
color: #6d6459 ;
}
body.earth-theme .version-markdown-content strong{
color: #3d3630 ;
}
body.earth-theme .version-markdown-content code{
background-color: #f5f0e8 ;
color: #b87333 ;
}
body.earth-theme .version-markdown-content pre{
background-color: #f5f0e8 ;
}