ant-design-vue/components/tabs/style/card-style.less

136 lines
3.1 KiB
Plaintext
Raw Normal View History

2017-11-02 02:42:34 +00:00
@import "../../style/themes/default";
@import "../../style/mixins/index";
2018-01-15 10:54:26 +00:00
2017-11-02 02:42:34 +00:00
@tab-prefix-cls: ~"@{ant-prefix}-tabs";
// card style
.@{tab-prefix-cls} {
&&-card > &-bar &-nav-container {
2018-01-15 10:54:26 +00:00
height: @tabs-card-height;
2017-11-02 02:42:34 +00:00
}
&&-card > &-bar &-ink-bar {
visibility: hidden;
}
&&-card > &-bar &-tab {
margin: 0;
2018-01-15 10:54:26 +00:00
border: @border-width-base @border-style-base @border-color-split;
2017-11-02 02:42:34 +00:00
border-bottom: 0;
border-radius: @border-radius-base @border-radius-base 0 0;
background: @tabs-card-head-background;
margin-right: 2px;
2018-01-15 10:54:26 +00:00
padding: 0 16px;
2017-11-02 02:42:34 +00:00
transition: all 0.3s @ease-in-out;
2018-01-15 10:54:26 +00:00
line-height: @tabs-card-height - 2px;
2017-11-02 02:42:34 +00:00
}
&&-card > &-bar &-tab-active {
background: @component-background;
2018-01-15 10:54:26 +00:00
border-color: @border-color-split;
2017-11-02 02:42:34 +00:00
color: @primary-color;
2018-01-15 10:54:26 +00:00
padding-bottom: 1px;
2017-11-02 02:42:34 +00:00
}
&&-card > &-bar &-tab-inactive {
padding: 0;
}
&&-card > &-bar &-nav-wrap {
margin-bottom: 0;
}
&&-card > &-bar &-tab .@{iconfont-css-prefix}-close {
color: @text-color-secondary;
transition: all .3s;
2018-01-15 10:54:26 +00:00
font-size: @font-size-sm;
margin-left: 3px;
margin-right: -5px;
2017-11-02 02:42:34 +00:00
overflow: hidden;
2018-01-15 10:54:26 +00:00
vertical-align: middle;
width: 16px;
height: 16px;
height: @font-size-base;
2017-11-02 02:42:34 +00:00
&: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 {
2018-01-15 10:54:26 +00:00
line-height: @tabs-card-height;
2017-11-02 02:42:34 +00:00
.@{tab-prefix-cls}-new-tab {
width: 20px;
height: 20px;
line-height: 20px;
text-align: center;
cursor: pointer;
2018-01-15 10:54:26 +00:00
border-radius: @border-radius-sm;
border: @border-width-base @border-style-base @border-color-split;
font-size: 12px;
color: @text-color;
2017-11-02 02:42:34 +00:00
transition: all .3s;
&:hover {
color: @primary-color;
border-color: @primary-color;
}
}
}
// https://github.com/ant-design/ant-design/issues/4669
&-vertical&-card > .@{tab-prefix-cls}-bar {
.@{tab-prefix-cls}-nav-container {
height: auto;
}
.@{tab-prefix-cls}-tab {
2018-01-15 10:54:26 +00:00
border-bottom: @border-width-base @border-style-base @border-color-split;
2017-11-02 02:42:34 +00:00
margin-bottom: 8px;
&-active {
padding-bottom: 4px;
}
&:last-child {
margin-bottom: 8px;
}
}
.@{tab-prefix-cls}-new-tab {
width: 90%;
}
}
&-vertical&-card&-left > .@{tab-prefix-cls}-bar {
.@{tab-prefix-cls}-nav-wrap {
margin-right: 0;
}
.@{tab-prefix-cls}-tab {
border-right: 0;
border-radius: @border-radius-base 0 0 @border-radius-base;
margin-right: 1px;
&-active {
margin-right: -1px;
padding-right: 18px;
}
}
}
&-vertical&-card&-right > .@{tab-prefix-cls}-bar {
.@{tab-prefix-cls}-nav-wrap {
margin-left: 0;
}
.@{tab-prefix-cls}-tab {
border-left: 0;
border-radius: 0 @border-radius-base @border-radius-base 0;
margin-left: 1px;
&-active {
margin-left: -1px;
padding-left: 18px;
}
}
}
}