UNPKG

choerodon-ui

Version:

An enterprise-class UI design language and React-based implementation

251 lines (238 loc) 6.81 kB
@import '../../style/themes/default'; @import '../../style/mixins/index'; @tab-prefix-cls: ~'@{c7n-prefix}-tabs'; // card style .@{tab-prefix-cls} { &-card { & > .@{tab-prefix-cls}-bar { border-bottom: @tabs-card-bar-border; } &.@{tab-prefix-cls}-bottom { .@{tab-prefix-cls}-bar { border-top: @tabs-card-bar-border; border-bottom: none; } } } &&-card > &-bar &-nav-container { align-self: flex-end; height: @tabs-card-height; font-size: @tabs-card-font-size; } &&-card > &-bar &-ink-bar { display: none; } &&-card > &-bar &-tab { margin: 0; margin-right: @tabs-card-tab-margin-right; padding: @tabs-card-tab-padding; line-height: calc(@tabs-card-height - 0.02rem); background: @tabs-card-head-background; border: @tabs-card-tab-border; border-bottom: @tabs-card-tab-border-bottom; border-radius: @tabs-card-border-radius; transition: @tabs-card-tab-transition; &:hover { background: @tabs-card-hover-background; } } &&-card > &-bar &-tab&-tab-active { color: @tabs-card-active-color; background: @tabs-card-active-background; border-color: @border-color-split; border-bottom: @tabs-card-tab-active-border-bottom; } &&-card > &-bar &-tab-inactive { padding: 0; } &&-card > &-bar &-nav-wrap { margin-bottom: 0; } &-nav-scroll { scroll-behavior: smooth; -ms-overflow-style: none; /* IE 10+ */ scrollbar-width: none; /* Firefox */ &::-webkit-scrollbar { display: none; /* Chrome Safari */ } } &&-card > &-bar &-tab .@{iconfont-css-prefix}-close { width: 0.16rem; height: @font-size-base; margin-right: -0.05rem; margin-left: 0.03rem; overflow: hidden; color: @text-color-secondary; font-size: @font-size-sm; vertical-align: middle; transition: all @animation-duration-slow; &:hover { color: @heading-color; } } &&-card &-content > &-tabpane, &&-editable-card &-content > &-tabpane { transition: none !important; &-inactive { overflow: hidden; } } &&-card > &-bar &-tab:hover .@{iconfont-css-prefix}-close { opacity: 1; } &-extra-content { display: flex; align-items: center; height: @tabs-card-height; margin-left: 0.02rem; .@{tab-prefix-cls}-extra-bar { display: flex; } .@{tab-prefix-cls}-more-tab { display: flex; align-items: center; justify-content: center; width: 100%; min-width: @tabs-card-min-width; background: @component-background; outline: none; cursor: pointer; transition: all @animation-duration-slow cubic-bezier(.645,.045,.355,1); &:hover { color: @tabs-card-active-color; } } .@{tab-prefix-cls}-new-tab { display: flex; align-items: center; justify-content: center; min-width: @tabs-card-min-width; background: @tabs-card-head-background; border: @border-width-base @border-style-base @border-color-split; border-bottom: none; border-radius: @border-radius-sm; outline: none; cursor: pointer; transition: all @animation-duration-slow; &:hover { color: @tabs-card-active-color; } } } &-extra-vertical-content { flex-direction: column; justify-content: space-between; width: 100%; height: auto; } &-nav-add { position: absolute; align-items: center; justify-content: center; min-width: @tabs-card-min-width; height: inherit; margin-right: 0.02rem; line-height: calc(@tabs-card-height - 0.02rem); background: @tabs-card-head-background; border: @border-width-base @border-style-base @border-color-split; border-radius: @border-radius-base @border-radius-base 0 0; outline: none; cursor: pointer; transition: all @animation-duration-slow @ease-in-out; &:hover { color: @tabs-card-active-color; background: @tabs-card-hover-background; } } &-nav-add-fixed{ position: relative; text-align: center; } &-nav-vertical-add { width: 100%; height: 0.2rem; padding: 0 0.16rem; line-height: .1rem; border-right:none; border-bottom: @border-width-base @border-style-base @border-color-split; } &-more-vertical-tab { height: 0.2rem; margin-bottom: 5px; border-top: @border-width-base @border-style-base @border-color-split; border-right:none; border-bottom: @border-width-base @border-style-base @border-color-split; border-left:none; } &-vertical&-card > .@{tab-prefix-cls}-bar { .@{tab-prefix-cls}-nav-container { height: auto; } .@{tab-prefix-cls}-tab { margin-bottom: 0.08rem; border-bottom: @border-width-base @border-style-base @border-color-split; &-active { padding-bottom: 0.04rem; } &:last-child { margin-bottom: 0.08rem; } } .@{tab-prefix-cls}-new-tab { width: 90%; } .@{tab-prefix-cls}-extra-content { width: 100%; } } &-vertical&-card&-left > .@{tab-prefix-cls}-bar { .@{tab-prefix-cls}-nav-wrap { margin-right: 0; } .@{tab-prefix-cls}-tab { margin-right: 0.01rem; border-right: 0; border-radius: @border-radius-base 0 0 @border-radius-base; &-active { margin-right: -0.01rem; padding-right: 0.18rem; } } } &-vertical&-card&-right > .@{tab-prefix-cls}-bar { .@{tab-prefix-cls}-nav-wrap { margin-left: 0; } .@{tab-prefix-cls}-tab { margin-left: 0.01rem; border-left: 0; border-radius: 0 @border-radius-base @border-radius-base 0; &-active { margin-left: -0.01rem; padding-left: 0.18rem; } } } &&-card&-bottom > &-bar &-nav-container { align-self: flex-start; } &&-card&-bottom > &-bar &-tab { border-top: 0; border-bottom: @border-width-base @border-style-base @border-color-split; border-radius: 0 0 @border-radius-base @border-radius-base; } &&-card&-bottom > &-bar &-tab-active { color: @primary-color; } &&-card &-tab-prev, &&-card &-tab-next { &.@{tab-prefix-cls}-tab-arrow-show { background: @tabs-card-arrow-show-background-color; border: @tabs-card-arrow-show-border; border-radius: @tabs-card-arrow-show-border-radius; &:not(.@{tab-prefix-cls}-tab-btn-disabled):hover { background: @tabs-card-arrow-show-hover-background-color; } } } }