@ccs-design/rc-pro-component
Version:
ccs design basic react component
257 lines (243 loc) • 5.37 kB
text/less
@import '~antd/es/style/themes/default.less';
.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-layout {
&-card-container {
& > .@{ant-prefix}-tabs-nav {
.@{ant-prefix}-tabs-tab {
padding: 8px 10px ;
background: #f0f2f5 ;
border-top: 0;
border-right: 0;
border-left: 0;
}
.@{ant-prefix}-tabs-tab-active {
color: @primary-color;
background: #fff ;
}
.@{ant-prefix}-tabs-tab-remove {
margin-left: 0;
}
}
& > .@{ant-prefix}-tabs-content-holder > {
> .@{ant-prefix}-tabs-content {
height: 100%;
.@{ant-prefix}-tabs-tabpane {
overflow-x: hidden;
overflow-y: auto;
}
}
}
}
&-siderbar {
z-index: 100;
overflow: auto;
overflow-x: hidden;
box-shadow: 2px 0 6px rgba(0, 21, 41, 0.1);
.@{ant-prefix}-layout-sider-trigger {
color: @primary-color;
}
.@{ant-prefix}-menu-inline,
.@{ant-prefix}-menu-vertical,
.@{ant-prefix}-menu-vertical-left {
border-right: 0;
}
}
&-header {
display: flex;
justify-content: space-between;
padding: 0 12px 0 16px;
&-left {
min-width: 150px;
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: 16px;
vertical-align: top;
}
}
&-mid {
flex: 1 1 auto;
overflow: hidden;
}
&-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 ;
}
}
&-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-layout-card-container > .ant-tabs-nav {
.ant-tabs-tab:first-child {
margin-left: 10px ;
}
}
}
&-user {
height: 100%;
text-align: right;
&-icon {
display: flex;
}
&-input {
width: 0 ;
min-width: 0;
overflow: hidden;
background: transparent;
border-radius: 0;
transition: width 0.3s;
:global(.ant-select-selection) {
background: transparent;
}
input {
padding-right: 0;
padding-left: 0;
border: 0;
// color: #fff;
box-shadow: none ;
}
&,
&:hover,
&:focus {
border-bottom: 1px solid #ccc;
}
}
&-show {
width: 160px ;
}
&-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;
}
}
}
}
.dark-theme {
.ccs-layout {
&-card-container {
& > .@{ant-prefix}-tabs-nav {
.@{ant-prefix}-tabs-tab {
background: #000 ;
}
.@{ant-prefix}-tabs-tab-active {
color: @primary-color;
background: #141414 ;
}
}
}
}
}