UNPKG

@ccs-design/rc-pro

Version:

ccs design basic react component

355 lines (334 loc) 7.67 kB
@import '~antd/es/style/themes/default.less'; .default-theme { ::-webkit-scrollbar { width: 8px; height: 6px; } ::-webkit-scrollbar-thumb { background-color: rgba(50, 50, 50, 0.2); border-radius: 1em; } ::-webkit-scrollbar-track { background-color: rgba(50, 50, 50, 0.1); border-radius: 1em; } } .dark-theme { ::-webkit-scrollbar { width: 6px; height: 6px; } ::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.15); border-radius: 3px; -webkit-box-shadow: inset 0 0 5px rgba(37, 37, 37, 0.05); box-shadow: inset 0 0 5px rgba(37, 37, 37, 0.05); } ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 3px; -webkit-box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.05); } } // tabs card 布局 .ccs-bl { .ccs-bl-card-container { & > .@{ant-prefix}-tabs-nav { position: fixed; right: 0; z-index: 99; transition: all 0.3s; .@{ant-prefix}-tabs-tab { padding: 6px !important; background: #f0f2f5 !important; border-top: 0; border-right: 0; border-left: 0; } .@{ant-prefix}-tabs-tab-active { color: @primary-color; background: #fff !important; } .@{ant-prefix}-tabs-tab-remove { margin-left: 0; } } & > .@{ant-prefix}-tabs-content-holder > { > .@{ant-prefix}-tabs-content { > .@{ant-prefix}-tabs-tabpane { margin-top: 35px; } } } } &-siderbar { position: fixed; top: 0; left: 0; z-index: 100; height: 100%; padding-top: 48px; overflow: auto; overflow-x: hidden; box-shadow: 2px 0 6px rgba(0, 21, 41, 0.1); .@{ant-prefix}-menu-inline, .@{ant-prefix}-menu-vertical, .@{ant-prefix}-menu-vertical-left { border-right: 0; } .@{ant-prefix}-layout-sider-children{ display: flex; flex-direction: column; // overflow: hidden; } .@{ant-prefix}-menu{ flex:1 1 0%; overflow: hidden auto; &::-webkit-scrollbar { width: 6px; height: 6px; } } } &-trigger{ line-height: 40px; border-top: 1px solid #f0f0f0; box-sizing:border-box; } &-header { display: flex; justify-content: space-between; padding: 0 12px 0 16px; &-left { min-width: 150px; flex-shrink: 0; img { display: inline-block; width: 32px; height: 32px; vertical-align: middle; } h1 { display: inline-block; margin: 0 0 0 12px; font-weight: 400; font-size: 20px; vertical-align: top; } } &-mid { flex: 1 1 auto; overflow: hidden; margin-left: 16px; } &-right { flex-shrink: 0; min-width: 150px; text-align: right; } } &-menu-flex { .@{ant-prefix}-menu-item-group-list { display: flex; flex-wrap: wrap; max-width: 500px; } .@{ant-prefix}-menu-item-selected { background: none !important; } } &-padding-left { padding-left: 10px; } &-header-icon { height: 48px; padding: 0 10px; color: #fff; font-size: 16px; cursor: pointer; .@{ant-prefix}-avatar-sm { width: 20px; height: 20px; line-height: 20px; background-color: @primary-color; border-radius: 50%; } &:hover { background-color: @primary-color; } } &-top { .ccs-bl-card-container > .@{ant-prefix}-tabs-nav { .@{ant-prefix}-tabs-tab:first-child { margin-left: 10px !important; } } } &-user { height: 100%; text-align: right; &-icon { display: flex; } &-input { width: 0 !important; min-width: 0; overflow: hidden; background: transparent; border-radius: 0; transition: width 0.3s; :global(.@{ant-prefix}-select-selection) { background: transparent; } input { padding-right: 0; padding-left: 0; border: 0; // color: #fff; box-shadow: none !important; } &, &:hover, &:focus { border-bottom: 1px solid #ccc; } } &-show { width: 160px !important; } &-menu { .anticon { margin-right: 8px; } .@{ant-prefix}-menu-item { width: 160px; } } &-layout { display: flex; &-top { position: relative; width: 44px; height: 36px; margin-right: 16px; overflow: hidden; background-color: #f0f2f5; border-radius: 4px; box-shadow: 0 1px 2.5px 0 rgba(0, 0, 0, 0.18); cursor: pointer; &:before { position: absolute; top: 0; left: 0; width: 100%; height: 25%; background-color: #001529; content: ''; } } &-left { position: relative; width: 44px; height: 36px; margin-right: 16px; overflow: hidden; background-color: #f0f2f5; border-radius: 4px; box-shadow: 0 1px 2.5px 0 rgba(0, 0, 0, 0.18); cursor: pointer; &:before { position: absolute; top: 0; left: 0; width: 25%; height: 100%; background-color: #fff; content: ''; } &:after { position: absolute; top: 0; left: 0; width: 100%; height: 25%; background-color: #001529; content: ''; } } &-checked { position: absolute; right: 0; bottom: 0; } } } &-breadcrumb { display: flex; align-items: center; justify-content: space-between; // height: 40px; padding: 10px 16px; background-color: #fff; > :first-child { color: rgba(0, 0, 0, 0.85); font-weight: 600; font-size: 20px; } } &-left { .ccs-bl-card-container > .@{ant-prefix}-tabs-nav { .@{ant-prefix}-tabs-tab:first-child { padding-left: 10px !important; } } } } .dark-theme { .ccs-bl { &-card-container { & > .@{ant-prefix}-tabs-nav { .@{ant-prefix}-tabs-tab { background: #000 !important; } .@{ant-prefix}-tabs-tab-active { color: @primary-color; background: #141414 !important; } } } &-breadcrumb { background-color: #141414; > :first-child { color: rgba(255, 255, 255, 0.85); } } &-trigger{ border-top: 1px solid @dark-border-color; } } } .default-theme,.dark-theme{ .screen-md, .screen-sm, .screen-xs { .ant-table { width: 100%; overflow-x: unset; } .ant-table-tbody > tr > td, .ant-table-tbody > tr > th, .ant-table-thead > tr > td, .ant-table-thead > tr > th { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } } } .compact-theme{ .ant-menu-vertical > .ant-menu-item, .ant-menu-vertical-left > .ant-menu-item, .ant-menu-vertical-right > .ant-menu-item, .ant-menu-inline > .ant-menu-item, .ant-menu-vertical > .ant-menu-submenu > .ant-menu-submenu-title, .ant-menu-vertical-left > .ant-menu-submenu > .ant-menu-submenu-title, .ant-menu-vertical-right > .ant-menu-submenu > .ant-menu-submenu-title, .ant-menu-inline > .ant-menu-submenu > .ant-menu-submenu-title { height: 30px; line-height: 30px ; } }