zent
Version:
一套前端设计语言和基于React的实现
157 lines (155 loc) • 4.49 kB
CSS
.zent-menu {
color: #333;
color: var(--theme-title-color, var(--theme-stroke-1, #333));
background-color: #fff;
background-color: var(--theme-section-bg, var(--theme-stroke-9, #fff));
box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.1);
box-shadow: var(--shadow-spec-layer, 0 2px 16px 0 rgba(var(--theme-rgb-shadow-bg, 0, 0, 0), 0.1));
font-size: 14px;
width: 240px;
list-style: none;
padding: 0;
margin: 0;
border-radius: 2px;
}
.zent-menu-item {
width: 100%;
height: 32px;
line-height: 32px;
text-align: left;
padding-left: 16px;
box-sizing: border-box;
position: relative;
cursor: pointer;
}
.zent-menu-item:first-child {
border-top-left-radius: 2px;
border-top-right-radius: 2px;
}
.zent-menu-item:last-child {
border-bottom-left-radius: 2px;
border-bottom-right-radius: 2px;
}
.zent-menu-item:hover {
background-color: #e6efff;
background-color: var(--theme-default-selected-bg, var(--theme-primary-8, #e6efff));
color: #333;
color: var(--theme-title-color, var(--theme-stroke-1, #333));
}
.zent-menu-item-disabled {
color: #e0e0e0;
color: var(--theme-default-border-color, var(--theme-stroke-5, #e0e0e0));
cursor: not-allowed;
}
.zent-menu-item-disabled:hover {
color: #e0e0e0;
color: var(--theme-default-border-color, var(--theme-stroke-5, #e0e0e0));
background-color: #fff;
background-color: var(--theme-section-bg, var(--theme-stroke-9, #fff));
}
.zent-menu .zenticon {
margin-right: 16px;
}
.zent-menu .zenticon.zent-submenu-title-operate-icon {
margin-right: 0;
}
.zent-menu .zenticon-right {
color: #999;
color: var(--theme-hint-color, var(--theme-stroke-3, #999));
position: absolute;
right: 10px;
top: 50%;
transform: translateY(-50%);
font-size: 12px;
}
.zent-menu .zent-submenu > .zent-menu {
position: absolute;
top: 0;
left: 100%;
margin-left: 0;
}
.zent-menu .zent-submenu-title {
margin-left: -10px;
padding-left: 10px;
}
.zent-menu .zent-submenu-title:hover {
background-color: #e6efff;
background-color: var(--theme-default-selected-bg, var(--theme-primary-8, #e6efff));
color: #333;
color: var(--theme-title-color, var(--theme-stroke-1, #333));
}
.zent-menu .zent-submenu-title.zent-submenu-disabled {
color: #e0e0e0;
color: var(--theme-default-border-color, var(--theme-stroke-5, #e0e0e0));
background-color: #fff;
background-color: var(--theme-section-bg, var(--theme-stroke-9, #fff));
}
.zent-menu__inline {
width: 200px;
}
.zent-menu__inline-item {
height: 40px;
line-height: 40px;
padding-left: 0;
}
.zent-menu__inline-item:not(.zent-menu-item-disabled) {
cursor: pointer;
}
.zent-menu__inline-item:not(.zent-menu-item-disabled):hover {
color: #155bd4;
color: var(--theme-primary-bg, var(--theme-primary-4, #155bd4));
}
.zent-menu__inline-item-selected {
color: #fff;
color: var(--theme-section-bg, var(--theme-stroke-9, #fff));
background-color: #155bd4;
background-color: var(--theme-primary-bg, var(--theme-primary-4, #155bd4));
}
.zent-menu__inline-item-selected:not(.zent-menu-item-disabled):hover {
color: #fff;
color: var(--theme-section-bg, var(--theme-stroke-9, #fff));
background-color: #114bae;
background-color: var(--theme-primary-active-bg, var(--theme-primary-3, #114bae));
}
.zent-menu__inline-submenu .zenticon-right {
top: 16px;
right: 20px;
transform: rotate(90deg);
transition: transform 200ms ease;
}
.zent-menu__inline-submenu-icon--expand.zenticon-right {
transform: rotate(-90deg);
}
.zent-menu__inline-submenu .zent-menu__inner {
background-color: #fff;
background-color: var(--theme-section-bg, var(--theme-stroke-9, #fff));
width: 100%;
list-style: none;
padding: 0;
margin: 0;
}
.zent-menu__inline-submenu-title {
width: 100%;
height: 40px;
line-height: 40px;
text-align: left;
padding-left: 10px;
box-sizing: border-box;
position: relative;
cursor: pointer;
}
.zent-menu__inline-submenu-title.zent-submenu-disabled {
color: #e0e0e0;
color: var(--theme-default-border-color, var(--theme-stroke-5, #e0e0e0));
cursor: not-allowed;
}
.zent-menu__inline-submenu-title:not(.zent-submenu-disabled):hover {
color: #155bd4;
color: var(--theme-primary-bg, var(--theme-primary-4, #155bd4));
background-color: #fff;
background-color: var(--theme-section-bg, var(--theme-stroke-9, #fff));
}
.zent-menu__inline-submenu-title:not(.zent-submenu-disabled):hover .zenticon {
color: #155bd4;
color: var(--theme-primary-bg, var(--theme-primary-4, #155bd4));
}